0

I can render my menu "Main Menu":

<?php if ($main_menu): ?>
    <?php print theme('links__system_main_menu', array(
        'links' => $main_menu,
        'attributes' => array(
            'id' => 'main-menu-links',
            'class' => array('nav', 'navbar-nav'),
        ),
        'heading' => array(
            'text' => t('Main menu'),
            'level' => 'h2',
            'class' => array('element-invisible'),
        ),
    )); ?>
<?php endif; ?>

All works fine!

Then i create custom menu "Custom Menu" with machine name: "custom-menu".

How can I render a this menu similar to the example above?

Thanks in advance.

1 Answers1

0

Each Menu creates a block, and you can do templates for each blocks. Maybe that's an easier way to do it, see How to theme a menu block in Drupal?

Community
  • 1
  • 1
joel.travieso
  • 91
  • 1
  • 6