Adding menu items

edited February 2011 in Feature Requests
Hi. Is there a way to add menu items in a controller? I have my navigation array defined in nav.php, but I have a section that is built in the controller and I would like to be able to merge the new items into the nav array so that they will get picked up by the fuel_nav function in the view.



  • edited 12:30PM
    In your controller you could include your nav.php file and then make the necessary changes to the $nav array. Then you pass that new array as the 'items' parameter like so:fuel_nav(array('items' => $new_nav))
  • edited 12:30PM
    Yes, that is what I finished up doing. I was hoping to be able to be able to modify the nav array so that I did not have calls to fuel_nav in different places, but I guess that nav.php is not loaded until the fuel_nav function is called.
Sign In or Register to comment.