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.
Is it possible to create a menu_block that replaces its parent block?
For example, I have the following menu at path "parent/*"
--parent
----child
And I would like to replace this with a new menu at path "parent/child/*"
----child
------grandchild
I realize this is similar to the "Make the starting level follow the active menu item" option or the Menu Trim module except that there are cases that don't follow these neat conventions, so I really need the flexibility to simply replace a menu with a new one.
Comments
Comment #1
JohnAlbinFor your first block, just specify the “Show block on specific pages” path as: parent
And for your second (replacement) bloc, specify:
parent/child1
parent/child1/*
parent/child2
parent/child2/*
Comment #2
aspafford CreditAttribution: aspafford commentedThanks for the quick reply. I think I need the parent block path to be "parent/*" because I've got a bunch of other pages under this path that don't get the replacement block, and this would result in one menu showing up above the other. But I think I'll follow up on the general support list since this is more of a block settings problem and not specific to this module.
Thanks,
Aaron