This library was realized by williamsconcepts.
This class is and interface to CI’s View class. It aims to improve the interaction between controllers and views.
The class is based on two files:
- configuration file: config-template.php
- library file: library-Template.php
- extract the content of download file;
- copy config-template.php into application/config/ and rename in template.php;
- copy library-Template.php into application/library/ and rename in Template.php.
- add the library in config/autoload.php configuration file;
- define the template and the regions in config/template.php configuration file.
- write the “master template” view (ex.: template.php);
documentation-> http://williamsconcepts.com/ci/codeigniter/libraries/template/reference.html
DOWNLOAD: CodeIgniter template class
Now you can write your view into template_view…
- calling $this->template->write(‘content’,'home’)
- followed by $this->teamplate->render()
You can find an example in this download: CodeIgniter example using Template Class