By shanghaiguide on
Is it possible to create a secondary links menu from within a module?
I don't see a way to access this from hook_menu
What I'd like to do is to create a secondary menu at runtime.
I've tried putting something like this in the callback of my module display page
global $secondary_links;
$terms = taxonomy_get_tree(5);
$secondary_links= "<ul class='tabs secondary'>";
foreach($terms as $term) {
$secondary_links.="<li><a href='/country/$country/".$term->tid."'>".$term->name."</a></li>";
}
$secondary_links.= "</ul>";
But its not working.
I can put code into the hook_menu, but I don't see how to make a secondary menu from there.
Any clues?