Chapter 5: Menus and Menu Links
Navigation is an important part of any web application. The ability to create menus and links easily in order to connect pages together is a core aspect of any content management system. Drupal is fully equipped with both the site-building capabilities and developer API to easily build and manipulate menus and links.
In this chapter, we will discuss menus and menu links from a Drupal 9 module developer perspective. In doing so, we will touch upon a few key aspects:
- The general architecture of the menu system in Drupal
- Manipulating and rendering menus
- Defining various types of menu links
By the end of this chapter, you should be able to understand what menus and menu links are, how to use them in your code and how to define menu links in your module. So let's get started.