![]() |
Dynamic elements in navigation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Dynamic elements in navigation (/showthread.php?tid=15262) |
Dynamic elements in navigation - El Forum - 01-30-2009 [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. Dynamic elements in navigation - El Forum - 01-30-2009 [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 |