By amariotti on
I am currently in the process of upgrading our main College site from D5 to D6 and have run into a brick wall.
In D5 I found this snippet that would allow me to print any part of my menu structure inside of a node. Here's the code:
$mid = *menu id*;
print theme('menu_tree', $mid);
This worked flawlessly on this page in D5. Now that I'm upgrading to D6 the snippet doesn't work, and I can't find any way of recreating it. I've done some looking around and haven't been able to find anything to replace it.
Comments
I looked around a bit more
I looked around a bit more and still haven't found anything. I'm hoping someone has some ideas this morning. :)
_
The menu system underwent a complete rewrite for d6 and it seems the argument for the theme_menu_tree function has changed.
Try the following:
That works for named menus-- i'm not sure how to grab just a piece of the menu.
Yeah, I've been able to do
Yeah, I've been able to do that successfully, but can't go any deeper than that. Why would something like this be changed to not work anymore? It made that page on our site so easy to manage because I didn't have to update the list to add new programs and stuff. WorldFallz, would you recommend another way of generating a Node that has a list of all of our programs organized by School? I remember trying some different things when we developed the site, but ended up going with this PHP snippet as the solution. I would easily consider anything else that could be used to "print" a portion of my menu structure. Thanks!
_
I doubt very much it's not possible-- if it was changed, it was changed for some sort of technical improvement. I'm just not sure what the new method would be. Perhaps browsing around api.drupal.org would be fruitful.
Apparently there is no simple solution
Outputting the top level of links has been made really nice with the use of menu_navigation_links such as
I would have expected specifying a 1 instead of a 0 would give you the menu's 1st set of children, but it doesn't do that (I don't know what it does).
The best that I could find is cdale's solution here http://drupal.org/node/329021#comment-1088262
(kudos to mokargas for pointing me in the right direction)