Using phptemplate, how do I loop through the items of a custom menu?

The following works for the "Primary links" and "Secondary links"...

if (isset($primary_links)) { print theme('links', $primary_links) }
if (isset($secondary_links)) { print theme('links', $secondary_links) }

But how do I ouput my "Footer links"? The following does not work and I do not know the syntax for passing the menu id (98)?

if (isset($footer_links)) { print theme('links', $footer_links) }

I also tried adding the "Footer links" as a block to the $footer placement, but it adds way more code than I want... I'd prefer to ouput the menu items with just a | pipe between each rather than an html unordered list.

Thanks in advance.

Comments

mikey_p’s picture

savnet, I'll be watching this as I'm interested in this as well and looking into it. It'd be awesome if you could drop a page in the handbook with this once you figure it out, here:

http://drupal.org/handbook/modules/menu

-Mikey P

briandelicata’s picture

You can try this:

<?php
$menuhtml = theme_menu_tree(XX);
print $menuhtml;
?>

where XX in theme_menu_tree is your menu number (go to admin/menus and hover over your footer menu to get the number).

And take a look at this: http://drupal.org/node/63814