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 trying to create a set of primary menu tabs that alternate color (colorA, colorB, colorA, etc.). I've found the $zebra variable in the preprocess-node.inc and node.tpl.php, but I'm not sure how to apply it to the menu.
I tried adding the code suggestion in this post to the template.php file in my sub-theme, but that hasn't done it.
Do you have any suggestions where I would set this in Omega 6x-1.x?
Comments
Comment #1
R-H CreditAttribution: R-H commentedNot 100% sure, but think that the superfish menu offers that capability.
http://drupal.org/project/superfish
Comment #2
himerus CreditAttribution: himerus commentedyeah, that is something that "should" be in there, but would just require using a custom function to build out the menu rather than just calling something like menu_main_menu() (D7) to grab the menu links.
Superfish might be a good idea for the D6 implementation, and I'll consider/look into implementing this in D7 for sure.
Comment #3
himerus CreditAttribution: himerus commentedComment #4
mrfelton CreditAttribution: mrfelton commentedHow come this got marked as works as designed? I think this would be a really useful feature. All list items should have odd and even classes to help themes. They get first and last class, but often this isn't enough. I'm reopening, changing to a feature request, and updating the version to 7.x-3.x since that's where this is likely to get developed.
Comment #5
mrfelton CreditAttribution: mrfelton commentedNote: There is a core issue that deals with this issue #256827: Various bugs in theme_item_list(), though it's not committed to D8 yet, and its unclear if it will be backported to D7 or not.
Comment #6
marcoka CreditAttribution: marcoka commentedhm. why no use :nth-child for that? noobs with ie up to 8 wont get it but ..thats weh you use IE :)