I created a custom menu called \"sub-top-nav\" and now I\'d like to override the html output. In particular I would like to add an unique class to each item like.
Th
I got it to work now. This piece of code might help someone else as well! It goes into yourtheme/template.php
function phptemplate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
if (!empty($extra_class))
$class .= ' '. $extra_class;
if ($in_active_trail)
$class .= ' active-trail';
$class .= ' ' . preg_replace('/[^a-zA-Z0-9]/', '', strtolower(strip_tags($link)));
return '- '. $link . $menu ."
\n";
}