This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_posts/display-custom-menu-drupal-7-theme-template-file.md
Oliver Davies 85a10c545b Run prettier on all *.md files
```
prettier '{app,source}/**/**.md' --write
```
2020-03-08 17:57:45 +00:00

629 B

title date excerpt tags
Display a Custom Menu in a Drupal 7 Theme Template File 2012-08-18 The code needed to display a menu in a Drupal 7 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')
  )
));