CodeIgniter Forums
How to implement header/content/footer in CI - 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: How to implement header/content/footer in CI (/showthread.php?tid=14512)



How to implement header/content/footer in CI - El Forum - 01-05-2009

[eluser]Unknown[/eluser]
Hi everyone, I'm programming my first site with CI (migrating form "pure" php actually), and there's a design question:

I have the typical "header/content/footer" pages, which I implemented using php's "include" instructions.

When using CI, however, I face the following dilema:

I have a controller that loads the three views (header, content and footer), but content should actually be a controller loaded dynamically.

How can I implement it or is there a better way to do it ?

Thanks in advance.


How to implement header/content/footer in CI - El Forum - 01-05-2009

[eluser]jalalski[/eluser]
I normally have the content view load the header and footer from the view itself.


How to implement header/content/footer in CI - El Forum - 01-05-2009

[eluser]bitist[/eluser]
Maybe this helps you:
http://ellislab.com/forums/viewthread/100728/#508762


How to implement header/content/footer in CI - El Forum - 01-05-2009

[eluser]Unknown[/eluser]
Thanks for your replies ... I was wondering if is it possible for CI - or some other php mvc framework - to use views a la JSP with Java Beans, so that when the view is invoked, it has the possibility to load a component with data read from - let's say - a database.

Thanks again !