Welcome Guest, Not a member yet? Register   Sign In
Help in include files
#16

[eluser]Rey Philip Regis[/eluser]
Code:
$this->load->model('template/template','TemplateFunctions', TRUE);
$data['cats'] = $this->TemplateFunctions->get_categories();
$this->load->view('template/template', $data);

Well, how about making a library or a helper function then put above code inside that function. Then configure that helper or library that you've made to be autoloaded in th autoload.php in the config folder. Then just call that library or helper in every constructor of your controller. Just make sure the reciever of the result will be a global variable, so it can be accessed to every method by your controller.


Good day.


Messages In This Thread
Help in include files - by El Forum - 11-14-2008, 10:22 AM
Help in include files - by El Forum - 11-14-2008, 01:10 PM
Help in include files - by El Forum - 11-14-2008, 01:18 PM
Help in include files - by El Forum - 11-14-2008, 01:25 PM
Help in include files - by El Forum - 11-14-2008, 01:26 PM
Help in include files - by El Forum - 11-14-2008, 01:29 PM
Help in include files - by El Forum - 11-14-2008, 01:33 PM
Help in include files - by El Forum - 11-14-2008, 01:36 PM
Help in include files - by El Forum - 11-14-2008, 01:37 PM
Help in include files - by El Forum - 11-14-2008, 02:07 PM
Help in include files - by El Forum - 11-14-2008, 02:10 PM
Help in include files - by El Forum - 11-17-2008, 04:52 AM
Help in include files - by El Forum - 11-17-2008, 10:00 AM
Help in include files - by El Forum - 11-17-2008, 11:22 AM
Help in include files - by El Forum - 11-17-2008, 11:26 AM
Help in include files - by El Forum - 11-17-2008, 04:16 PM
Help in include files - by El Forum - 11-17-2008, 05:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB