Hi all.

I am still relatively new to all this and I recently borrowed some code to theme the secondary menu items and I think it is choking on the integration with the "me" module.

Here is the code for menu_item.tpl.php:

$link = menu_item_link($mid);
// replace spaces with "_", and strip HTML
$css_id = str_replace(' ', '_', strip_tags($link));
// render the menu link with unique CSS id.
$output = '<li id="'.$css_id.'" class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) .'">'. $link . $children ."</li>\n";
print $output;

Here is the code for template.php:

...

function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) {
  return _phptemplate_callback('menu_item', array(
        'leaf' => $leaf,
        'mid' => $mid,
        'children' => $children
    ));
}

finally, here are a few lines from style.css:

li#My_account a{
  background-image:url(images/view_user.png);
  margin-left:4px;
}

The problem is any menu item that is pointed to with user/me/nodename only shows the icon for the parent menu item.

Any idea how to "fix" this?

Thanks in advanced,

Dan

Comments

holydrupal’s picture