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.
Thank-you again for the awesome module. We are doing some downstream theming on menu_blocks and would like the ability to theme level 1, 2 and 3 menu items differently. To do this we would like menu_block to reset the depth parameters appropriately relative to the 'piece' of the tree that you have specified in the block. This would mean that after menu_block has done it's pruning the root menu item would have depth 1 and it's children would follow from there.
Comment | File | Size | Author |
---|---|---|---|
#1 | menu_block-reset_depth-1967912-1.patch | 757 bytes | joel_osc |
Comments
Comment #1
joel_osc CreditAttribution: joel_osc commentedHere is a patch which provides this functionality.
Comment #2
gmclelland CreditAttribution: gmclelland commentedHmm... Thanks for the patch, but I'm not sure this works correctly. I have a nested vertical sidebar menu. I wanted to add classes for each level that is shown. Even though I'm 4 levels deep in the menu, I want the css classes to start at level-1, level-2, etc. Is this possible? Currently it shows the starting level as level-4.
Also the patch has white space errors.
I'm really only wanting this to style the first level menu items only.