5. Adding administrative links
To provide a usable and integrated administration experience the different pages need to be connected and enriched with Drupal’s standard administrative links.
5.1. Add a menu link for the event listing
Section titled “5.1. Add a menu link for the event listing”For the event listing to show up in the toolbar menu under Content, we need to provide a menu link for it.
-
Add an
event.links.menu.ymlfile in the event module directory with the following: -
Rebuild caches
Run
drush cache:rebuild -
Verify that there is an Events link in the toolbar menu.
Note that there is no Event local task on
/admin/content.
5.2. Add a local task for the event listing
Section titled “5.2. Add a local task for the event listing”-
Add an
event.links.task.ymlfile in the event module directory with the following: -
Rebuild caches
Run
drush cache:rebuild -
Verify that the Events local task appears on
/admin/content
5.3. Add local tasks for the edit and delete forms
Section titled “5.3. Add local tasks for the edit and delete forms”-
Add the following to
event.links.task.yml: -
Rebuild caches
Run
drush cache:rebuild -
Visit
/events/2Verify that View, Edit and Delete local tasks are shown.