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'm using suckerfish menu. It'll be best if I could define/add my own ul class "sf-menu".
Is there any way to do this with the module?
Comment | File | Size | Author |
---|---|---|---|
#4 | add_wrapper_template_per_level.patch | 1.32 KB | gaborpeter |
Comments
Comment #1
JohnAlbinMenu block's ULs are just generated using Drupal's standard theme_menu_tree(). So you can override that add classes to the UL.
Comment #3
technicka CreditAttribution: technicka commentedThis has put me in the right direction, but I was wondering if anyone could walk me through how to do this:
I would like to add 2 classes to ONLY the parent <*ul*> of ONE of Menu Block divs.
I put this into my template.php file:
That is working, it's just that is is being applied to EVERY ul, whereas I would just like the parent to get these classes. Also, I only want this to apply to ONLY one specific menu block (div#block-menu_block-4).
I understand I am missing a lot of logic in the function, but if some one could give me an idea hopefully I can figure it out. Thank you so much for your help and the great module.
Comment #4
gaborpeter CreditAttribution: gaborpeter commentedCheck out my patch, which adds the possibility of creating a wrapper template per level.
Comment #5
JohnAlbin