Welcome Guest, Not a member yet? Register   Sign In
Dynamic elements in navigation
#1

[eluser]macleodjb[/eluser]
This is probably a dumb question. I created a model with some scripts that i want to access from within the left column of my page. I have not created a controller for the left column. I tried loading the model directly into my view file(leftcol.php) and received an error. How can i access my model on a global level without a controller?

My need for this is my navigation in the left side is database driven and will be included into multiple pages. Whats the best practice for doing something like that.
#2

[eluser]obiron2[/eluser]
$this->load->view('leftcol',false)

Should load the view into the controller without firing the view render method.

You will need to fire the render manually after you have collated all your view fragments - you should find this in the user guide. Also look on the board for threads about nested views and templating

you can call a view which calls other views.

Obiron




Theme © iAndrew 2016 - Forum software by © MyBB