Hello,
I'm trying to find a way to get a list of the root menus in d6 so that I could reference and call them individually later. In d5 and earlier, there was a great function, menu_get_root_menus (http://api.drupal.org/api/function/menu_get_root_menus/5), which did this. In d6, this is now missing, and after a little bit of looking, I can't seem to find something that replicates its functionality. The closest I've found is menu_get_names, which only gets the names of the menus.
I presume menu_get_root_menus was removed because that's no longer the correct way to reference menus, but is there a way to accomplish the spirit of the function, which was to return a list of the root menus and some way to individually reference them?
Comments
If I understand correctly
If I understand correctly you want all children of the root plid? (pid in drupal5)
The root plid is stored in a variable
$rootmenu = variable_get('menu_primary_menu',0);If you want menu_router info I think a left outer join should work.
This will give you all menus directly under root, which may include primary-links, custom menus, module custom menus like devel, and navigation.
menu_get_menus
This one helped in my case: http://api.drupal.org/api/function/menu_get_menus/6
Try this
$menu_name = menu name from menu_get_names
You got complete menu tree in $tree array