oliverdavies.uk/source/_posts/2012-08-18-display-custom-menu-drupal-7-theme-template-file.md
2015-04-01 00:05:56 +01:00

709 B

title nav use description slug tags
Display a Custom Menu in a Drupal 7 Theme Template File blog
posts
For reference, this is the code needed to display a menu in a Drupal 7 template file. display-custom-menu-drupal-7-theme-template-file
Drupal
Drupal 7
Drupal Planet
PHP
ARIA

For reference, this is the code needed to display a menu in a Drupal 7 template file, including the navigation ARIA role.

$menu_name = 'menu-footer-menu';
$menu_id = 'footer-menu';
print theme('links', array(
  'links' => menu_navigation_links($menu_name),
  'attributes' => array(
     'id' => $menu_id,
     'role' => 'navigation',
     'class'=> array('links', 'inline')
  )
));