Drupal's menu system allows users to create as many separate menus as they need throughout their site. Links can be created to both external sites and internal pieces of content. The site administration interface gives users (with sufficient permissions) the ability to organize and sort these links within their respective menus. The API provided by the menu system gives developers the ability to interact with and alter menu links. The API also includes a mechanism to provide menu links from within custom modules.
Example tasks
- Create several menus for use (and display) in various locations throughout a site
- Add a link to a menu from within a custom module
- Understand how existing menu items can be altered
Confidence
The Drupal menu system is stable in core.
Drupalize.Me resources
Configuring menus
Menus can be added as menu blocks using the Block display system
For developers
From the Develop Custom Pages guide:
From the Drupal Module Developer Guide:
Drupal 7
This tutorial is part of our Module Developer in Drupal 7 series. Several of the tutorials that follow this one walk through some of the more advanced techniques for working with the menu system.
External resources
- Accessible Navigation with Drupal Core's Menu System (lullabot.com)
- New to Drupal 8.9 and 9.0 is the ability to create the HTML
<button>element within a native Drupal menu that can be used to toggle secondary menus (such as drop-downs or mega-menus) in a usable and accessible way. Learn more in this article from Lullabot by front-end developer Mike Herschel.
- New to Drupal 8.9 and 9.0 is the ability to create the HTML