Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

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 8:40PM
    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 8:40PM
    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.