Best practice for including headers and footers - 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: Best practice for including headers and footers (/showthread.php?tid=9349) |
Best practice for including headers and footers - El Forum - 06-22-2008 [eluser]mattalexx[/eluser] In my application's views folder, I created a CakePHP-esque layouts folder. With the layouts folder I put "front", "admin" and "minimal" folders. Within each of these, I put a header.php file and a footer.php file. Right now, I am putting this code into my controller to include headers and footers: Code: class Items extends Controller { Best practice for including headers and footers - El Forum - 06-22-2008 [eluser]Raiko[/eluser] I put something similar into a library and autoloaded it. Mine does a bit more (loads CSS and JS files as well), but all in one line of code instead of many. Best practice for including headers and footers - El Forum - 06-22-2008 [eluser]EEssam[/eluser] http://ellislab.com/forums/viewthread/81780/ Best practice for including headers and footers - El Forum - 06-22-2008 [eluser]mattalexx[/eluser] [quote author="EEssam" date="1214195442"]http://ellislab.com/forums/viewthread/81780/ [/quote] Thanks for that. |