Hi,

I'm using the following php code on my site

$header_links = menu_navigation_links('menu-services',0);
//print_r($header_links);
print theme('links', $header_links);

This show me all the terms at level 0 in my menu.

Now I tried

$header_links = menu_navigation_links('menu-services',1);
//print_r($header_links);
print theme('links', $header_links);

This does not output anything, the print_r is also showing an empty array.
Although when I put this menu as a block on my drupal site, it shows the sub items in the menu.

Why are the sub items not shown with the above code?

I also wonder, what would be the easiest way to also include all nodes with these terms automatically into this menu?

Comments

indytechcook’s picture

Status: Active » Postponed (maintainer needs more info)

I also wonder, what would be the easiest way to also include all nodes with these terms automatically into this menu?

This is not easy and has been attempted. I can't find the issue right now but I know there was one. It's also out of scope for taxonomy menu.

I'm not sure what to tell you on your other issue. What happens when you leave out the 2nd argument?

JGO’s picture

Well I have the same problem. No output of the subterms in any case

Array ( [menu-1075] => Array ( [attributes] => Array ( [title] => ) [alter] => 1 [href] => taxonomy/term/15/all [title] => Products ) [menu-1077] => Array ( [attributes] => Array ( [title] => ) [alter] => 1 [href] => taxonomy/term/14/all [title] => Services ) )

Products
Services

While I should see something like:

Products
subterm > Information Protection
Services

So the subterm Information Protection is never found,

indytechcook’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Hello. This is a duplicate of #426304: [NOT SOLVED] Hierarchical menu, NOT expaning to current term. There seems to be a bug with the menu_tree_data/_menu_tree_data functions in menu.inc of core. See comment 30 for a list of possible fixes. I haven't tested any myself yet.

I have found the issue very reproducible when you use the "all" option.