Sponsored:

If someone googles you right now and you don’t come up? You might as well not exist. Every client, opportunity and connection is passing you by.
You don’t need to know code. RoseHosting lets you launch something you’re proud of this afternoon.
Stop hiding. Build yours today.
Author:
Source
Recently, in one of our projects with Drupal 10, we faced an interesting challenge: implementing two-level “local tasks” for a specific functionality of our module. Despite the number of documentation related to local tasks in Drupal, setting up two levels of these tasks proved challenging, as we couldn’t get them to display in the way we needed. However, after exhaustive research, we found an example in an existing module that helped us solve the problem.
Exploring the Problem
The need was to add a main “local task” and three associated subtasks that would show up when viewing or editing a node. Initially, the main obstacle was finding the right way to implement two levels of local tasks.
The Solution: Inspiration from Contributed Modules
During our search among existing contributed modules, we found…