Just found an incompatibly with module menu_position:
menu_position is adding some stuff into the menu tree php object (which are not really menu_item...) menu_block get confused during the building process of the renderable array (function menu_block_tree_output
): The result is that the active menu item will have automatically the css class "expanded" if he has a "menu_position" rule on itself, even if it is not really expanded.
Whereas the "core" default way of building renderable array for menu work fine in the same situation. So I suggest a change in the way menu_block is building menu structure, to make it similar to the core menu:
- menu core is doing:
if ($data['link']['has_children'] && $data['below']) {$class[] = 'expanded';}
- block_menu is doing:
if ($data['below']) {$class[] = 'expanded';}
Issue already notice here http://drupal.org/node/1266816 with detailed explanations (but issue has since changed subject and has been closed)
Comment | File | Size | Author |
---|---|---|---|
#2 | menu_block-menu_position_compatible-1812824-2.patch | 459 bytes | gabriel.achille |
Comments
Comment #1
gabriel.achille CreditAttribution: gabriel.achille commentedtypo
Comment #2
gabriel.achille CreditAttribution: gabriel.achille commentedhere is the proposed patch.
Comment #3
JohnAlbinFixed!