/ Published in: PHP
URL: http://drupal.org/node/310356#comment-1210124
Place the following function in your theme's template.php
Expand |
Embed | Plain Text
/** * Theme override for theme_menu_item() */ function phptemplate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) { $class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')); $class .= ' '. $extra_class; } if ($in_active_trail) { $class .= ' active-trail'; } // Add unique identifier $item_id += 1; $id .= ' ' . 'menu-item-custom-id-' . $item_id; // Add semi-unique class return '<li class="'. $class .'" id="' . $id . '">'. $link . $menu ."</li>\n"; }
Comments
Subscribe to comments
You need to login to post a comment.

[Drupal 6] It works! Big thanks!