[eluser]PhilTem[/eluser]
I'd create a library called "Navigation" that has some method called maybe "render" which you can also call via a helper "navigation_render()" so that your view only has the line
Code:
echo navigation_render();
while the helper does something like
Code:
function navigation_render()
{
static $CI;
isset($CI) OR $CI =& get_instance();
isset($CI->navigation) OR $CI->load->library('navigation');
return $CI->navigation->render();
}
What your method render of class navigation does should be up to you, but it will basically grab the allowed/viewable items of the menu and pass those to a view that will properly format the array to e.g. an UL or OL.
Besides: You might want to consider using a templating library because it'll keep your code from getting wet plus it just is nicer to have a wrapper around some content rather than pre-content, content and post-content parts, IMHO