/ Published in: PHP
Basically, a simple way to use a templating system in CodeIgniter. In your data array, add a view as the value for content. Pass that to the view, then print the $content variable in the view.
Expand |
Embed | Plain Text
//In the controller: public function index() { $this->data['content'] = 'your-views-name'; $this->load->view('your-templates-name', $this->data); } //In the view: <?php $this->load->view($content); ?>
You need to login to post a comment.
