Creating multiple menus

edited September 2011 in Share
I am having some trouble with creating multiple menus via the admin interface and then displaying these.

The pages I have are

Home
Help
Help/Delivery
Help/Returns
Help/Custom Orders
About
About/History
About/Contact Us
About/Location

All of the pages apart from About/Location are pages created through the admin interface. Admin/Location is a straight CI controller and view.

I need three menus.

1) The main menu which will have Home, Help and About in.
2) A menu to appear on all of the help pages with all of the help sub pages
3) A menu to appear on all of the about pages with all of the about sub pages

Any help would be great.

Thanks

Comments

  • edited 11:47AM
    You can create a menu either statically by creating a nav file or in the admin using the navigation module.

    If you creating a menu statically, you can add to the nav file like so:
    http://www.getfuelcms.com/blog/2010/12/12/learning-fuel-cms-part-2

    By default, fuel_nav will look for the variable named $nav but that can be controlled by specifying the var parameter fuel_nav(array('group_id' => 'my_group', 'var' => 'footernav')

    If you are creating the menu in the admin, you can assign each to a different group.

    Then, in your view, you can use fuel_nav(array('group_id' => 'my_group'.... )) to display the menu.

    Here is some additional information which I hope helps:
    http://www.getfuelcms.com/user_guide/modules/fuel/navigation
  • edited 11:47AM
    Thanks for the reply.

    I have added a new navigation group called help. When I select navigation in the admin and then choose the help group there are currently no pages.

    Is the only way to add pages to use the upload?
  • edited 11:47AM
    You should be able to create a navigation item and associate it with a page by clicking the "create" button above that empty list.
  • edited 11:47AM
    Thanks for your help. I really like the idea of combining the abilities of the CI framework with a content management system. It fits a lot of my projects perfectly.
  • edited 11:47AM
    Hi, i'm trying to use the navigation fonctionality with no success.

    That's the code I'm using in my breadcrumb

    $options = array('container_tag' => 'div',
    'container_tag_id' => 'footerNav',
    'use_titles' => true,
    'group_id' => 1, 'parent' => uri_segment(1));
    echo 'test2';
    echo fuel_nav($options);

    I'm using the navigation tools in the back office to create my diagram

    Thing like that
    Home
    Repair/test
    Repair/test2
    Glass/Test
    Glass/Test2
    About
    About/info
    About/contact
    ...

    But my breadcrumb only work when the url contain "repair" at first place
    I try to change group_id, remove group_id and I don't want change the core code (of course)

    So do you have any idea?
  • edited 11:47AM
    What happens if you remove the parent option?
Sign In or Register to comment.