Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can Menu Block trim a menu at a certain level, display that trimmed menu and hide the original submenu?
Example:
This is the menu without trimming:
Home
Services
Design
Branding
Contact
And this with trimming the services submenu:
Home
Services
Contact
New block:
Design
Branding
Or, if you want to see a live example:
and
Comments
Comment #1
JohnAlbinEasily! Give it a try. You'll need 2 menu blocks. One showing the 1st level of your menu and the other showing the 2nd level.
Comment #2
mlieshout CreditAttribution: mlieshout commentedOke, that was easy ;)
A quick guide for newbies:
Install Menu Block and activate it.
Then, on admin/build/blocks disable the default Primary links block.
Add two new menu blocks:
- One for the first level of the menu, these are the settings:
Menu: Primary links
Item:
Starting level: 1st level (primary)
Maximum depth: 1
- Second one for the second level menus:
Menu: Primary links
Item:
Starting level: 2nd level (secondary)
Maximum depth: 1
And activate the blocks.