Add a Menu Link in a Module for Drupal 8, Drupal 9, and Drupal 10

Last updated October 25, 2021
Module Development9.5.x/10.0.x

In this tutorial we will learn how to add menu links using a custom Drupal module. We will also look at the options available for configuring our new menu link. Lastly, we'll learn about using hook_menu_links_discovered_alter() that can be used to add new menu links, or alter the behavior of existing ones.