[eluser]victorche[/eluser]
Thank you, @all! It works like a charm ... One last question I have ... Now I am not duplicating this part of code in every controller:
Code:
$links = $this->general->get_links();
But I still have this line in my data array:
Code:
$data = array(
'menu_links' => $this->links,
// other data here ...
);
Is there an option to avoid this line in every controller too? I mean a chance to put it in MY_Controller.php? I really can not fully understand these parts, where some things will be used globally on every page. And the problem here is that I am using Phil's template library. So in MY_Controller.php I have:
Code:
$this->template->set_partial('header', 'header_tpl', FALSE); // This is the header partial
$this->template->set_layout('page_tpl'); // This is my main wrapper layout
But how can I insert $this->links in here? In the template library I have functions like "inject" which are maybe written for my case, but unfortunately the documentation is so poor :/ You can check it here:
http://philsturgeon.co.uk/code/codeigniter-template