[eluser]newbrand[/eluser]
Hi there,
I'm still wrapping my head around "typical" CI development norms. I've created a few basic registration, login, activation scripts etc. but now I'm trying to work out a way to create a templating engine that I can push to all the pages.
I've created a new library class called SiteTemplate and stored all my default methods, attributes etc. simple stuff like metatag handlers, JS modifiers etc.
Then I have a foot() and head() method which I plan to call before and after my $this->load->view() calls on each controller. The thing is that my site template will typically be modified by session or data actions thus I thought it would be best to specify the template specific functions in the controller as opposed to the view.
So in essence in each method in my classes I'd do soemthing like this:
Code:
$this->sitetemplate->head();
$this->load->view('register', $data);
$this->sitetemplate->foot();
I was hoping to get some feedback from the community on what the "norm" is to solve this problem. I'm trying to produce a light-weight solution without a template parser or anything like that. I'm not married to this method, esp. if there are much better ways out there.
:-)
Thanks in advance.
Dave