Drupal - get $primary_links with nested menus as php array
I'm trying to get a PHP array that includes a simple nested list of primary_links and their sub-menu items. This seems like a simple task but I can't seem to get a straight answer on how exactly to do it.
From there I would theme it exactly as needed.
Thanks!开发者_JAVA百科
This seemed to do the trick!
menu_tree_all_data('primary-links')
Did you try this function? menu_primary_links();
精彩评论