[eluser]victorche[/eluser]
Thanks a lot, but this is not my problem. I am using Phil's template library and in my case I am asking for a variable, which I want to set in MY_Controller.php. And believe me, I was searching the forum for 2 weeks already.
That's why I am creating something like a general (common) model, which functions can be used globally, on every page. And I am loading this model (general_model.php) in MY_Controller.php
I am not sure if this is the right approach, but this way I can use all the common functions from general_model.php all over the site (in different controllers).
But I want something else. I want to declare a variable in one file and to use it in different controllers. Just because, as in this example with the menu links, I have these links on every page.
So instead of using this in every controller:
Code:
$links = $this->general->get_links();
I want to do it once, in MY_Controller.php
But it is not working. The general model is loaded, but declaring the variable $links there is not enough.