Welcome Guest, Not a member yet? Register   Sign In
View problem
#1

[eluser]Unknown[/eluser]
I have a controller called 'cart' that's main function is to get the content of a shopping cart and then output it to a view.

$this->load->view('cart', $aData);

This all works fine but the project I developing works by using a library to load all the views and hten assign them to variable (kind of like a template). This means that the view I am loading in my controller is getting overridden with this line.

$aData['shoppingCart'] = $this->load->view('cart', '', true);

Is there a way I can call a constructor from this library and then pass the data into the view frmo the library?

Thanks for any help

By the way I'm not allowed to change the structure of the project





Theme © iAndrew 2016 - Forum software by © MyBB