Bart, as discussed:
The d8 port doesn't work in combination with the menu_block module when one sets the Maximum number of menu levels to display != unlimited .
When you set the Maximum number of menu levels to display value of a menu_block to something else than unlimited the $item['below']
value of the corresponding menu is empty. So when you try enable the first child on this menu link, this doesn't work.
The function parse(array $item)
in /scr/MenuItenParser.php fails to alter the menu link to its child, which makes sense because the $item['below']
item is empty.
We should try to find an alternative implementation, inorder to get this working.
Comment | File | Size | Author |
---|---|---|---|
#4 | menu_firstchild-unexpanded.patch | 6.25 KB | lammensj |
Comments
Comment #2
dpacassiI'm currently using the menu firstchild module on a D8.2.6 site with a limited maximum number of levels.
However, everything works as expected (currently having up to 3 levels in my navigation).
Maybe we should test this bug on a clean installation?
Comment #3
kfu CreditAttribution: kfu commentedIn my case the reason because it didn't fully work with menu block was that I didn't check "Show as expanded" for the parent item. Maybe this helps someone else.
Comment #4
lammensj CreditAttribution: lammensj at iO commentedHad the same issue; my link has children but does not show as expanded. Therefor,
$item['below']
was empty. The patch included uses the MenuLinkTreeInterface in order to determine the first child.Comment #5
Cauliflower CreditAttribution: Cauliflower commentedI think this is a duplicate of https://www.drupal.org/project/menu_firstchild/issues/2854536