I'm creating about 5 or 6 menus in Drupal's menu system. I'm just adding them as Primary Links, Secondary Links, etc. are set up.

I need to put very specific html around the different list items. So I'm trying to do something like this...

<?php if (is_array($primary_links)) { ?>
  <ul>
      <?php foreach ($primary_links as $link): ?>
      <li>/* something */</li>
      <?php endforeach; ?>
  </ul>
<?php } else { ?>

Except I want $primary_links to be substituted with my custom menu called siteselectors that I created in drupal.

Am I way too simplistic here? I'm just wanted to insert that directly into my theme. Is there a better way? This just seemed like the way to go with my knowledge.

Any help is great!

Comments

Anonymous’s picture

I think your best bet would be to try menu_tree_all_data ( http://api.drupal.org/api/function/menu_tree_all_data/6 )

You could do something like this:

$your_menu_links = menu_tree_all_data('yourmenuname');

Hope that helps!

Sincerely,
Leighton Whiting

xpersonas’s picture

Perfect! Thank you! Sometimes I just need a kick in the right direction.