Page headers and footers, is this OK? |
[eluser]digitalbloke[/eluser]
Hi (again!) I was reading over some of the ways to generate headers and footers with CI. I also looked at the template class: http://williamsconcepts.com/ci/codeignit.../template/ along with a few others and then I came up with this. I just wanted to check if it is technical correct... I have a library like so: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); And I call it from my controllers like so: Code: <?php Thanks, still new to all this
[eluser]Shay Falador[/eluser]
Hmm first thing to do is to change the 'Template' class from a controller to a library or a model. It is not a controller. I personally prefer using a single view file, which calls other view files by the arguments it receives, if necessary. Good luck
[eluser]digitalbloke[/eluser]
Hi Shay! Thanks for your reply. Extending Controller was the only way I could find to be able to call $this->load->view(); |
Welcome Guest, Not a member yet? Register Sign In |