Adding action links to pages in Drupal 8
drupal 8 action links on dynamic routes
links.action.yml appears_on dynamic
To put an action link on an arbitrary node page, you'll need to get the route for that node. You can't do drupal router:debug | grep '/my-alias' nor even drupal router:debug | grep '/node/8' — console is only providing the real routes, not the (literally infinite) paths that can be created by these routes.
If you do:
drupal router:debug | grep '/node/'
You'll note it returns the route:
You cannot use a yaml file to put an action link on a dynamic path, on a route name only when given a parameter, such as a particular node.
How do I create a link to add a specific content type
Create an "add content" link in View Header that is only visible to users with appropriate permissions. [Solved]
Add link to add content to views lists
Add action link to view
Local action links now provided by plugins using YAML discovery and implementing LocalActionInterface
YAML files for menu links, contextual links, local tasks, and local actions have been renamed
c: 2016 November 21, Monday, 5:27 PM