[eluser]natefons[/eluser]
so lets say i have 3 (or even 100) different view "templates" that get used in different controller.
currently, most repetitive work (like say a menu, or other elements that might change in the future, but will be consistent through out all the views), i have placed in to a helper function, and i would call the helper to grab the data.
for example:
helper:
Code:
function menu()
{
$data="<a href="#">Home</a> <a href="#">About</a>
//etc etc etc
return $data
}
now when i need to display the menu on a view, i would just either put
menu(); on the view itself, or pass it to a variable in the controller.
i have also seen people put repetitive work like menus on a seperate view, and then load the data to a variable on the controller:
$data['menu']=$this->load->view('menu');
my question is, what is the more preferred method/fastest/etc etc