I have a content type with some entity reference fields to another content types. I want to add local task tabs to the node view page, to link those referenced node. However I cannot figure it out how to do it only for the specific content type.
I have created a my_module.links.task.yml file with following contents:
my_module.my_content.my_content_type: route_name: entity.node.canonical title: Overview parent_id: entity.node.canonical weight: 0 class: '\Drupal\my_module\Plugin\Menu\MyContentTab' my_module.my_content.my_referenced_node: route_name: entity.node.canonical title: Referenced content parent_id: entity.node.canonical weight: 10 class: '\Drupal\my_module\Plugin\Menu\MyReferencedContentTab' # ... More tabs to the other referenced nodes
The classes are working as they should, and providing the tabs to the referenced nodes correctly. However the tabs are also showing on all content types.
How can I make them show only on the specific content type?