Welcome Guest, Not a member yet? Register   Sign In
Templating with Code Igniter
#1

[eluser]Unknown[/eluser]
I'm very new to Code Igniter, so any help or suggestions here is appreciated.

I know I'm being a little picky, but I would rather not have to load my header, load my content view, and then load my footer every time I want to render a page on my site.

I typically use a "master page" approach, where I have one master template that just include()s the other views. I find that this approach makes it a lot easier to keep my template organized, rather than splitting up my XHTML templates into header/footer sections

Can anyone help me brainstorm some ways to accomplish a master page approach? I was thinking of possibly creating a class that extends Controller (myController for example) and somehow have it call include header and include footer. However, if I make a class that extends myController, I need myController to first call include header, then call whatever is in the extending class's index(), then call include footer.

So yeah, hopefully that makes sense. It's a little late and I've been battling with my laptop all day so I'm pretty tired. Again, any ideas are very much appreciated.

Thanks!
Mike

edit:
after searching the forums I've stumbled across http://williamsconcepts.com/ci/codeignit...index.html, and it looks very promising.


Messages In This Thread
Templating with Code Igniter - by El Forum - 08-19-2008, 09:56 PM
Templating with Code Igniter - by El Forum - 08-19-2008, 11:32 PM
Templating with Code Igniter - by El Forum - 08-21-2008, 05:33 PM
Templating with Code Igniter - by El Forum - 08-22-2008, 07:47 AM
Templating with Code Igniter - by El Forum - 08-22-2008, 07:56 AM
Templating with Code Igniter - by El Forum - 08-22-2008, 08:01 AM
Templating with Code Igniter - by El Forum - 08-22-2008, 11:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB