Welcome Guest, Not a member yet? Register   Sign In
use header, body and footer all the time

I'm using the same header and footer for all the pages in my site. So where can I define it so that I can use it only by echoing a variable in a view file

Best way would be to extend the controller class using MY_Controller, pass data from that to your controllers so you use a file like header.php and footer.php as a template. You could also output your data into a small section of your layout by passing data this way as well. You could even go a step further than that and use the database to get the folder information, so you could end up with a real template system Smile

Make sense? I think they're are some good examples of how to do it in the wiki if I remember correctly.

Have a look at http://codeigniter.com/wiki/Header_and_f...very_page/.

[eluser]Phil Sturgeon[/eluser]
Take a look at my Template library. If you create a MY_Controller this works perfectly. :-)

Theme © iAndrew 2016 - Forum software by © MyBB