second level menu items - advanced menu module

Topics: Customizing Orchard, General
May 17, 2011 at 4:15 AM

Hi there,

I need to implement a very simple site and want to do this with Orchard.

I am stuck defining the navigation menu.

The menu structure is very simple:

1) Home

  • About Us
  • Where to find us
  • ....

2) Products

  • Product A
  • Product B
  • Product C

The hierarchy is only two levels deep.

What I need to have is a menu that displays all root level items and the second level items for the selected root item ONLY!

I am using the advanced menu module.

Can this behavior be achieved with this module?
If not, what would be the best approach to achieve this?

The closest I could get was by adding two menu widgets.
 The top menu shows the root items only.
The lower menu shows the children of the selected item.
BUT as soon as I select a second level item the lower menu shows nothing (as it has no children).

Thank you! 

 

 

 

May 24, 2011 at 2:28 AM

Just in case anyone else runs into this, I was able to easily solve it with the Advanced Menu module and a StyledMenuWidget with MenuStyle set to: SuperfishNavbar

 

Jun 1, 2011 at 8:02 PM

Can you provide any more details on exactly how you implemented "a StyledMenuWidget with MenuStyle set to: SuperfishNavbar" ???

I do not see anything named StyledMenuWidget in my Widgets section so all I could think to do is place "SuperfishNavbar" in the class setting of a particular menu item.

Without any documentation on how to implement hierarchical menus using the Advanced Menu module, this control is hardly intuitive...

Thanks in advance for any advice you can provide.

-P

Jun 2, 2011 at 3:35 AM

Visit the 'Widgets' section. Hit the 'Add' button in the zone you wish to add your menu widget to, e.g. 'Navigation'.
From the 'Choose A Widget' form you select 'Styled Menu Widget'
You can then configure this widget as you please.

Jun 2, 2011 at 1:25 PM

Thank you. One last question - How do you associate a parent node to children node?  I have toe following menus:

Main Menu:

  • Home
  • Components
  • Register
  • Manage

Manage Menu

  • Manage Option 1
  • Manage Option 2
  • Manage Option 3
  • Manage Option 4

I would like the Manage tab off of the Main menu to be linked to the Manage Menu.  Setting up the Main Menu seems simple enough.  What I am unclear on is how to associate the Manage Menu to the Manage option of the main Menu tab.  Is it the:

  • <label for="Mode">Menu display mode</label>
  • The root node to display for children?
    • if so what should that value be? Manage, 4, etc..

Thank you in advance for your help.

-P

Jun 2, 2011 at 2:13 PM

The 'Position' value for Manage should be 3 (first item has value 0 not 1). But 4 also works.
Anyhow:

'Manage Option 1' -> 3.1
'Manage Option 2' -> 3.2
etc... 

 

Jun 2, 2011 at 2:56 PM

I did update the position value of the Manage styledmenuwidget to 3 and the result is still the same.

Maybe I am expecting more than this is capeable of...

I have 2 StyledMenuWidgets defined - one named Main and the other names Manage.  When I view the 2 styledmenuwidgets in the navigation zone, I am just seeing the 2 menus stacked on top of eachother. I was expecting to just see the main menu's 4 options and when I hover over the Manage tab, see the Manage tab's 4 options appear below.  Is this not possible ???

For the main menu, what should the following properties be set to:

  • <label for="Mode">Menu display mode: AllItems/SubItems/SameLevel</label>
  • <label for="MenuName"><label for="RootNode">The root node to display children for</label></label>

For the manage menu, what should the following properties be set to:

  • <label for="Mode">Menu display mode: AllItems/SubItems/SameLevel</label>
  • <label for="MenuName"><label for="RootNode">The root node to display children for</label></label>

 

Jun 2, 2011 at 3:05 PM
Edited Jun 2, 2011 at 3:06 PM

That is exactly how I have mine defined.
You only  need one styledmenuwidget though.
Be sure to set:
Style -> 'SuperfishNavbar'.
Menu Display mode -> All items
Root node ... -> leave empty
Limit levels -> 0