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

R-H’s picture

Not 100% sure, but think that the superfish menu offers that capability.

http://drupal.org/project/superfish

himerus’s picture

yeah, 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.

himerus’s picture

Status: Active » Closed (works as designed)
mrfelton’s picture

Version: 6.x-1.x-dev » 7.x-3.x-dev
Category: support » feature
Status: Closed (works as designed) » Active

How 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.

mrfelton’s picture

Note: 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.

marcoka’s picture

Assigned: Unassigned » himerus

hm. why no use :nth-child for that? noobs with ie up to 8 wont get it but ..thats weh you use IE :)