I need 3 different templates for my Codeigniter application. I had read about Themes’ library. But still I didn’t get any idea about how to add a template to Codeignier ..
I got about how to involke template in Controller .
Please help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m using this template library, is really simple and works well for me.
application/libraries/Template.php
application/config/template.php
application/views/templates/main.php
application/controllers/welcome.php
I usually put the config/library files on autoload, and you can use anytime $this->template->set_template(‘other_template’); to use another one 🙂
Hope it helps.