I have run into several things I don't understand; so I'll list them here:
$menu_name = variable_get('menu_primary_links_source', 'primary-links'); returns blank
such that this will not work;
$menubar = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'));
so I tried this
$menubar = menu_navigation_links('primary-links');
which returns the top most items, level 0; which then I'm sure I'll have to add in the 'below' sub menus with some code.
Now I want to override; so I'm looking at this
echo theme('links', $menubar);
now this is what I really don't understand; if I create a block, lets call it 'menubar' and assign it to my primary-links; I have found that it will already be formatted so I can't pass it in as above; I need it in an array; which is what I'm trying to do here $menubar = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links')); which seems to work, but doesn't have all the sub-menu items in it.
I've looked at using $menubar = menu_tree_page_data('primary-links'); which has more nodes; but it seems like it will be more work to clean it up.
My question is what function should I use if I wish to pull in all menu items with the subs attached and is this the correct way to do this?
I need to reformat the HTML for all links.