[eluser]loathsome[/eluser]
Hi there.
I'm currently developing a project, and this time we're using CI as our base. At every single page, we have a menu that fetches dynamic content from a database. The function to fetch content is located in the
menu model.
Anyway, as the menu is going to be shown on every single page, we have placed the function to fetch this in a
helper. So, in views/menu.php we're simply doing a
Code:
<?php $this->load->helper('menu'); ?>
The helper file loads up the model, fetches the content and displays the output.
The other solution would be to load the model, fetch content and pass it on to the view page in
every single controller.
I appreciate your input here.
Thanks a lot!