I have been trying to work with the template.php file to give any menu items a custom class. I was trying to use the D6 example here: http://drupal.org/node/345624 to do the same thing. I attempted with a few other functions I found in the menu includes file with no luck. Has anyone been able to do this? I'm new to hooks and modifying functions so sorry if this is an easy question. Thanks!

Comments

da_solver’s picture

The link http://drupal.org/node/345624 points to the "Theming Guide". Therefore, why wouldn't you post your question in the "Theme Development" forum? http://drupal.org/forum/3

When you say "class", are you talking about a css class? Or are you talking about a programming construct (i.e. Object/Class)?

greg_gy’s picture

There is a D7 module for that : http://drupal.org/project/menu_attributes

jason_gates’s picture

This question looks like it belongs in the Theme Development forum.

greg_gy’s picture

Oups, double, sorry.
There is a D7 module for that : http://drupal.org/project/menu_attributes