0

I'm using Drupal 7.35, with the stock menu module. I've set up a menu that has multiple submenus, and ran into something interesting: the submenus only are printed to HTML when you're on that menu's parent page.

For example, let's say this is my full menu:

- Link 1
  - Link 1.1
  - Link 1.2
- Link 2
- Link 3
  - Link 3.1
  - Link 3.2
  - Link 3.3
- Link 4
  - Link 4.1

Each submenu shows up only if you're on that menu's parent item. So, when you're not on any of those pages, the Menu is printed like this:

- Link 1
- Link 2
- Link 3
- Link 4

If you're on the Link 1 page, or any children thereof, it prints like such:

- Link 1
  - Link 1.1
  - Link 1.2
- Link 2
- Link 3
- Link 4

If you're on Link 4, it looks like this:

- Link 1
- Link 2
- Link 3
- Link 4
  - Link 4.1

I want all the menu items to always be printed. How do I do that? Is this normal behavior, because I'm pretty sure I didn't have this issue on the other Drupal site that I've worked on.

  • Just a quick note. You are using a version of Drupal 7 with multiple security vulnerabilities in Drupal Core. See release notes of 7.38 for details: drupal.org/drupal-7.38-release-notes – Brady Jul 16 '15 at 13:44
  • In regards to menus. There is a good reason there are so many contributed menu modules for D7. The core menu system is extremely basic and unflexible. I do not know a D7 website that does not use some sort of menu module. I happen to use Nice Menus a lot. Superfish is also popular. Mega menu is another. – Brady Jul 16 '15 at 13:49
  • Did you set checkbox "Show as expanded" in parent menu items? – Andrew Jul 16 '15 at 13:54
1

One of the solution is to use Menu Block. It allow you to display any menu items based on depth. So you have all the control. To list all the menus, in Menu Block you can change the "Maximum depth" to Unlimited. enter image description here

--- Updated 07/06/15 10:25am ---

You may need to use the Advanced options in your situation. Then check the "Expand all children of this tree". See below screenshot for details. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.