Working with Local Tasks
One of the most common content blocks within Drupal 8 that is often forgotten about when creating a theme is Local Tasks, often referred to as Tabs. We can see an example of the Tabs block whenever a user needs to perform some sort of action, such as viewing and editing a Node, or even when logging in to Drupal. If we make sure that we are logged out of Drupal Admin and then navigate to /user/login
, we will see the Log in and Reset your password links that make up the tabs on the user login page:
If we input our admin credentials and log in to our Drupal instance we will see that the local tasks menu changes to display View, Shortcuts, and Edit links. The local tasks menu will change, based on the type of page we are on and the permissions that each user has been assigned.
If we navigate to the About Us page located at /about
, we will see that our local tasks menu now provides us with the ability to View, Edit, or Delete the current Node.
Now that we have a better...