Welcome Guest, Not a member yet? Register   Sign In
passing data to the view
#1

[eluser]strattonbrazil[/eluser]
I can't seem to pass data to my view. This seems to be a popular question, but it's usually solved by something like the person not passing the array to the view, which I'm doing. I have my full controller and view shown below.

Code:
class Dashboard extends Controller {

        function Dashboard()
    {
        parent::Controller();
        }
    
    function index()
    {
            $data['controller_name'] = (string)get_class();

        $this->load->view('header', $data);
                $this->load->view('header_bg', $data);
                $this->load->view('navigation_bg', $data);
                $this->load->view('main', $data);
                $this->load->view('future', $data);
                $this->load->view('footer_bg', $data);
    }
}

I believe I might have seen somewhere someone sending view() another argument that looked like a path. Do I need to do that if I'm using mod_rewrite or something?

In my view...

<?
$controller_name; // causes a undefined variable error.
?>


Messages In This Thread
passing data to the view - by El Forum - 01-06-2011, 09:20 PM
passing data to the view - by El Forum - 01-06-2011, 09:25 PM
passing data to the view - by El Forum - 01-06-2011, 11:24 PM
passing data to the view - by El Forum - 01-07-2011, 12:44 AM
passing data to the view - by El Forum - 01-07-2011, 01:07 AM
passing data to the view - by El Forum - 01-07-2011, 05:52 AM
passing data to the view - by El Forum - 01-07-2011, 08:46 AM
passing data to the view - by El Forum - 01-07-2011, 08:47 AM
passing data to the view - by El Forum - 01-07-2011, 09:01 AM
passing data to the view - by El Forum - 01-07-2011, 09:06 AM
passing data to the view - by El Forum - 01-07-2011, 09:11 AM
passing data to the view - by El Forum - 01-07-2011, 04:41 PM
passing data to the view - by El Forum - 01-07-2011, 05:18 PM
passing data to the view - by El Forum - 01-07-2011, 05:59 PM
passing data to the view - by El Forum - 01-07-2011, 06:57 PM
passing data to the view - by El Forum - 01-07-2011, 07:38 PM
passing data to the view - by El Forum - 01-07-2011, 07:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB