Setting views globally - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Setting views globally (/showthread.php?tid=31658) |
Setting views globally - El Forum - 06-27-2010 [eluser]GeXus[/eluser] Is it possible to set a global view template? So for example, the site I'm working on has a header, navigation, body, and footer. Is there a way to not have to load these within each function or page that uses them? Setting views globally - El Forum - 06-27-2010 [eluser]pickupman[/eluser] There are several template libraries out there, but I have been using the one linked in my signature. It was simple enough to setup, and was easy to implement yet still have good flexibility. With it you create a simple html file with regions header/menu/content/sidebar/footer defined. In your your controller you assign a view to a section like content/sidebar, and the template library puts it all together. Setting views globally - El Forum - 06-27-2010 [eluser]TheIgniter[/eluser] I like the phil sturgeon's template library when dealing with modules! Code: http://philsturgeon.co.uk/code |