By kulfi on
I've found the following snippet which shows the primary links in a block:
<?php
$output = theme('dhtml_menu_tree', variable_get('menu_primary_menu',0), array('class'=>'dhtml_menu menu-root'));
return $output;
?>
I have zero php skills, and am hoping someone can help me figure out how to show only the lower level items. For example, the entire menu looks like:
A -- A1 -- A2 -- A3 ------ A3i ------ A3ii B C -- C1 -- C2 ------ C2i ------ C2ii ------ C2ii D
The regular, horizontal primary menu displays the top two levels. I'd like to have a block that shows the sub-level menu tree.
Comments
There are a couple of
There are a couple of modules that can help you, for instance menu_trim. http://drupal.org/project/menu_trim
Thanks!
That module does exactly what I was looking for.
for reference, note that
for reference, note that there are many ways to do this at the theme level, too. (it may be preferable to not add an additional module/dependency for this type of thing...)
here are a couple of pointers for relevant functions that i've come across (check out the API site for more info):
and here are a couple of related discussions i've participated in recently:
http://drupal.org/node/241361
http://drupal.org/node/230307
I think you misread the
I think you misread the question, it isn't related to the other threads - but http://drupal.org/project/menu_trim was a perfect fit.