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 know this can be handled by overriding the theme functions but I thought it might be useful to a lot of people.
It would be useful to add the menu name as a class of the nice menus ul tag.
This would make nice menus more compatible with a great deal of themes, including garland, that use primary-links & secondary-links as classes for those menus.
The patch is for the current dev.
Comment | File | Size | Author |
---|---|---|---|
#3 | 886338.3-menu-class.patch | 1.05 KB | deviantintegral |
nice_menus-menu_name_class.patch | 783 bytes | Agileware | |
Comments
Comment #1
add1sun CreditAttribution: add1sun commentedComment #2
zevans23 CreditAttribution: zevans23 commentedFantastic. I came here looking for support for theme colours and hoping I could make it land in the right place without diving into the CSS. This is a good first step - patch works and has put the menu on the right of the title banner, where it belongs in Garland, great. Now just need to swap colours around. It tried it in 6.x by the way and it works.
Comment #3
deviantintegral CreditAttribution: deviantintegral commentedA reroll of this for 7.x-2.x. If this is good, the original patch against 6.x should be fine to commit as well.
Comment #4
xiukun.zhou CreditAttribution: xiukun.zhou commentedHi, deviantintegral
This may be conflict with other menu so I do not think this is a good patch
Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyne for the help and great work on this issue.
Cheers!
Comment #5
xiukun.zhou CreditAttribution: xiukun.zhou commentedComment #6
davidtrainer CreditAttribution: davidtrainer commented@xiukun.zhou
To alleviate potential class name collisions, how about if we prefix the menu name with "nice-menu-" and use that as a class, just like the way $direction is handled?
Comment #7
xiukun.zhou CreditAttribution: xiukun.zhou commentedThanks davidtrainer.
this idea is very good.
Comment #8
xiukun.zhou CreditAttribution: xiukun.zhou commentedThanks a lot to davidtrainer, Agileware and everyone else for the great work on the patches, testing, reviews and reporting.
It's more time this got committed and I went ahead and had this rolled at:
7.x-2.x: 2272f73.
6.x-2.x: 65a223f.
Marking this as fixed.
Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyne for the help and great work on this issue.
Cheers!