Community & Support

Header Menu & Submenu: only show children

Hello,

I have the following menu structure (primary links)

- Item 1
- Item 1.1
Item 1.1.1
- Item 1.2
- Item 1.3
- Item 2
- Item 2.1
- Item 3
- Item 3.1
- Item 3.2

In my horizontal Header menu I only show: Item 1, Item2, Item 3

When I click one of the header items, for example "Item 1", I wan't to show in my left content only the children items:
"Item 1.1", "Item 1.2", "Item 1.3"

I've already read a lot about it, but I can't find a solid solution.
Any tips?

Comments

This is achieved through the

This is achieved through the combination of primary and secondary links. In your theme, the output for primary links I assume is correct, i.e. the horizontal header menu - if you don't know what I'm talking about here, have a look at Garland's page.tpl.php and search for $primary_links and $secondary_links), similarly, and this might get trickier depending on the theme you're using, the secondary links should go on the left.

We keep your menu structure, i.e. the primary links, and on the settings page for Menus, we set both Source for primary links and Source for secondary links to Primary links.

Views?

I'm trying to solve the same issue. It seems like using Views to create a block might be the best way to set this up ... however, I haven't been able to find a simple solution.

Did you make any headway?

Try Menu block

I'm not sure if this is what you're after, but you can try this:
http://drupal.org/project/menu_block

  1. Put your pages in the primary links menu (Administer > Site building > Menus > Primary links).
  2. Go to Site building > Blocks > Add menu block to create your submenu block
  3. Set the Parent item menu to be 'Primary links' and make the Starting level 'Second level (Secondary)'
  4. Save and put your new menu block wherever you want - in the left-hand column, for example

Now you should get Item 1, Item 2, Item 3 etc across the top and when you click on one of them their children will appear in the side menu.

If you want breadcrumbs and the default Drupal breadcrumbs aren't working for you then try:
http://drupal.org/project/menu_breadcrumb

The slight disadvantage of this approach is that your list of primary links at Administer > Site building > Menus > Primary links can become very long for a big site. You can make it shorter by using:
http://drupal.org/project/menutrails
but you might not need to.

Thank you!

Fantastic, beasley. Thank you much!

How do you do this in Drupal

How do you do this in Drupal 7 please?

nobody click here