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.
I've spotted something, which could be something that was overlooked by this module, or an issue with Menu block itself:
When a menu block has it's level set to 2 (to show sub items of a main nav only), and one of the 2nd level menu items is set to active using context, the menu stays hidden.
Standard behaviour should be to show the menu if it contains an active item, regardless of whether a page from that menu is being physically viewed - which leads me to think this is an issue with the Menu Block module.
Comments
Comment #1
kenianbei CreditAttribution: kenianbei commentedI think if you set the menu block to 'Expand all children of this tree. ' it will fix this.
Comment #2
mvuijlst CreditAttribution: mvuijlst commented...and if you don't want to expand all children? Is there any way to get around the issue?
Comment #3
Mark TrappThere is no workaround. Menu Block does not populate the children of the menu unless it's checked, so the module can't traverse the menu tree to find the active menu item.
This is a duplicate of #1081840: Support for menu items past 1st level?.
Comment #4
mirie CreditAttribution: mirie commentedPerhaps this would work?
If you expand all of the children and add some js (loaded via template.php maybe) to change the menu block appearance. For example,
Comment #5
jptaranto CreditAttribution: jptaranto commentedThanks Mirie, you're a champ :)
The JS code worked well & setting the expand option now shows the menu when stuff is set to active.