Header and Footer |
[eluser]Unknown[/eluser]
Hello, I'm new to CodeIgniter (switched from Kohana) and I'm already in love with it. But what I can't achieve is a simple solution for a global header and footer which is added automatically to any action. In Kohana I had a self written base controller that extended every other controller with two methods before() (showed header) and after() (showed footer). I came over a pretty solution with hooks in CodeIgniter, but I can't figure a way out how to pass a var from my action to the hook (for example the page title). My header and footer both have some logic to do (account info, etc). Thanks for your help. Max
[eluser]xtremer360[/eluser]
I would highly suggest you look on the wiki page of codeigniter and there are plenty of template libraries that are available. Pick the one that best suits your needs. I find Phil Sturgeon's as one of the better ones but there are quite a few.
[eluser]Otemu[/eluser]
Old solution I posted awhile ago check it out Quote:Better yet follow this great tutorial as it shows you how to create master template page which is more or less what your looking for |
Welcome Guest, Not a member yet? Register Sign In |