[eluser]zoreli[/eluser]
Hi
I have some functions (like the one that build the navigation menu) which are used on whole site. At this time, I am writting those functions in every controller.
Consider the following peace of code:
Code:
// get school excursions for the top menu
$this->load->model('excursionsModel');
$this->db->where('catid = "6"');
$data['schoolExcursions'] = $this->excursionsModel->get();
My front end template has: header, main_content and footer.
I need this code to build the main menu on the front end. And I have this code is in my header part. How can I write it once and call it only once?
Regards, Zoreli