Show only children of active item

Created on 30 September 2010, about 14 years ago
Updated 28 December 2015, almost 9 years ago

Say I have a menu structure like this:

Parent1
- Child1.1
-- Grandchild 1.1.1
-- Grandchild 1.1.2
- Child1.2
-- Grandchild 1.2.1
-- Grandchild 1.2.2
- Child1.3
-- Grandchild 1.3.1
-- Grandchild 1.3.2

With Child1.1 as my active item, I wish to display the following menu block:

Parent1
- Child1.1
-- Grandchild 1.1.1
-- Grandchild 1.1.2
- Child1.2
- Child1.3

I.e. I want to see the parent, the siblings but restrict the children to the children of only the active item. Is there a way to achieve this at present, or could this option be added to menu_block?

Feature request
Status

Needs work

Version

2.0

Component

User interface

Created by

🇩🇪Germany letzel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇷Brazil claudia sotto

    Hey,

    I'll follow this issue.

    I'm having the same problem. In Drupal 7 this module works.
    In Drupal 9 it doesn't show the children of the menu item.

    My menu:
    -item 1
    --item 1.1
    ---item 1.1.1
    ----item 1.1.1.1
    ----item 1.1.1.2
    ---item 1.1.2
    ----item 1.1.2.1

    In Drupal 7 is working:
    Initial level: 3rd level (ex. item 1.1.1)
    Fixed parent level: item 1
    Maximal depth: 1
    Follow the active menu item
    First level will be children of active menu

    I can see, when in term page 1.1.1, the menu:
    -item 1.1.1.1
    -item 1.1.1.2

    In Drupal 9 I try (and it doesn't work)
    Visibility initial level: 3 (ex. item 1.1.1)
    Levels to be exibited: 1
    Fixed parent level: Item 1
    Follow the active menu item
    Initial visibility level will be: sons of active menu level

    - if I check "Expand all menu links", it shows all links at this menu level.
    -item 1.1.1.1
    -item 1.1.1.2
    -item 1.1.2.1

    - if i don't check "Expand all menu links", it shows nothing.

Production build 0.71.5 2024