Welcome Guest, Not a member yet? Register   Sign In
How to implement header/content/footer in CI
#1

[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.
#2

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

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

[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 !




Theme © iAndrew 2016 - Forum software by © MyBB