[eluser]calingrim[/eluser]
[quote author="Opel" date="1222455952"]you either have to set
function index() {
$this->template->write_view('header', 'files/header');
$this->template->write_view('content', 'files/changeContent');
$this->template->write_view('footer', 'files/footer');
$this->template->render();
}
or in your config file you can set it as a default, if you look in the Template user guide[/quote]
So you are telling me that if I have a controller named main.php
Code:
function index() {
$data['query'] = $this->db->get('a_table');
/* and much more code here */
$this->template->write_view('header', 'files/header', $data);
$this->template->write_view('content', 'files/content');
$this->template->write_view('footer', 'files/footer');
$this->template->render();
}
I will have to write everything in a new controller named changeContent.php? Like this:
Code:
function index() {
$data['query'] = $this->db->get('a_table');
/* and much more code here */
$this->template->write_view('header', 'files/header', $data);
$this->template->write_view('content', 'files/changeContent');
$this->template->write_view('footer', 'files/footer');
$this->template->render();
}
?