By ryan.nauman on
I am looking for a block with the primary links menu shown but the first level parents removed. Only 2nd and below. With this small modification but otherwise exactly the way that the primary links menu in a block works now.
Is there a way to do what this snippet does in D6? Primarily the second snippet where the 2nd level of navigation and active trail of it is shown. http://drupal.org/node/142352
$links = menu_primary_links(2);
if ($links) {
$key = key($links);
$ekey = explode('-', $key);
$pid = $ekey[3];
$output = theme_menu_tree($pid);
return $output;
}
So far I have got:
$links = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 2);
if ($links) {
$output = theme('links', $links, array('class' => 'menu'));
}
return $output;
This produces the 2nd level but it doesn't do the 2nd level's children.
Comments
Instead, check out the Menu
Instead, check out the Menu Block module, which has options for displaying specific menu levels.
Wow I'm so happy that you
Wow I'm so happy that you showed me this but so mad at how much time I spent trying to do it myself. Thanks!