Hello,

I'm using this code that I found in the handbook:

// allows to display icons with the primary links
function primary_links_add_icons() {
  $links = menu_primary_links();
  $level_tmp = explode('-', key($links));
  $level = $level_tmp[0];
  $output = "<ul class=\"links-$level\">\n";   
  if ($links) {
    foreach ($links as $link) {
       $link = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']);
       $cssid = str_replace(' ', '_', strip_tags($link));
       $output .= '<li id="'.$cssid.'"><span class="menu-hidden-text">' . $link . '</span></li>';
    };
    $output .= '</ul>';
  }
  return $output;
}

I'm trying to get it to show the 2nd level of the primary links, but when I try to modify the menu_primary_links , it doesn't work.

any one know how I can get the 2nd level too?

thanks

Idan

Comments

rjb’s picture

I think this is what you are looking for: http://drupal.org/node/278434

Cheers,
Ronald

limex67’s picture