Welcome Guest, Not a member yet? Register   Sign In
Architecture Header - Body - Footer
#1

[eluser]DCZ[/eluser]
Hey everybody !

I want to bounce an idea to see what other people think and if they have better solutions.

Since my header and footer are the same on every page I would like to add them as simple as possible to every page.

I used to have code like this :

--> load_header();
--> load_body (arg[]);
--> load_footer();
--> print_to_screen();

And the load_body would call a differnt page depending on the url parameters.
So I would only have to load my header and footer only once.

Now I would like to start using CI.
So in order to have the same result I've created a MY_Controller that extends the controller class. Inside I have 2 functions "load_header" and "load_footer".
Every new page extends MY_Controller, but I still have to call on every page "load_header", "load_footer" in order to print my header and footer.

So now I was wondering if there wasn't a better way ?

Greetz


Messages In This Thread
Architecture Header - Body - Footer - by El Forum - 04-28-2009, 06:51 AM
Architecture Header - Body - Footer - by El Forum - 04-28-2009, 06:54 AM
Architecture Header - Body - Footer - by El Forum - 04-28-2009, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB