从Codeigniter Template Partials读取数据时出现问题,以及使用控制器重定向

I have two unrelated Codeigniter problems:

(a) I am trying to redirect a user to the dashboard after logging in successfully. i.e. from controller "auth" to controller "dashboard". For some odd reason, it keeps redirecting to auth/dashboard (404 error since it does not exist).

This is what I did:

//Within the auth controller    
    if ($this->auth->login($username, $password)) //Auth->login returns boolean
    {
    redirect('/dashboard', 'refresh');
    # redirect('/dashboard', 'location');  // I tried this too
    # redirect('/dashboard/index', 'refresh');   // I also tried this!
    }

What am I doing wrong, please? It just keeps redirecting to auth/dashboard

(b) I am using Phil Sturgeon's brilliant Codeigniter Template library (without a Parser) and I am unable to receive data sent into a partials file. This data is ONLY needed by the partials file. I have been over the (unfortunately sparse) library documentation, S/O posts on the topic, and also the CI forums to no avail, there seems to be no clear-cut example showing how a partial receives data that a controller assigns to it.

This is how I have been doing it. Please tell me what I must be doing wrong.

// In the controller page
$this->data['user'] = array('info' => 'username', 'value' => 'Cogicero');
$this->data['prefs'] = array('foo' => 'bar');
$this->template
     ->set_partial('header', 'partials/header', $this->data)
     ->set_layout('blog')
     ->build('foobar_view');

And

        //In the header partials page
        <?php
        /* snip */
        print_r($data);
        print_r($prefs);
        print_r($user);
        echo $user["info"];
        echo $prefs["foo"];
        ?>

All the above produce "array does not exist" or "undefined variable" errors! How am I meant to be receiving data within the partials view file?

Thanks

EDIT: Working on a tight deadline so with no solution in sight, I had to abandon Phil Sturgeon's template library and pick up Jens Segers' instead. http://www.jenssegers.be/blog/25/Codeigniter-template-library It is a little similar to Phil's but for some reason the partials are receiving and rendering my data properly. Also, Sergers' template library is very well documented. All is fine now, so I'll accept my own answer to problem (a). Thanks everyone.

(a) So after a lot of fiddling around I have solved the first problem i.e. the redirects.

In the config file, we have

| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url']=

Apparently, I didn't set a base URL because I'm still on a development local server, I was going to set it to the www address when I upload to the test server. Codeigniter had been guessing all along, but the guess didn't work for my authentication redirects. I set the base url and all redirects were fine.

(b) Now, to see why the partial views are not receiving data. Any help please? :(