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

Last updated October 25, 2021
Module Development8.9.x/9.3.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.