Dynamic local tasks to the same route with slug I have a route set up with a slug accepting taxonomy terms (routing.yml):

example.column:
  path: '/column/{taxonomy_term}'


I would like to add (secondary, although that's not important) local task tabs on a page, one for each possible term of the vocabulary used (links.task.yml):

example.column_list:
  deriver: 'Drupal\example\Plugin\Derivative\ColumnTasks'
  parent_id: example.parent


The deriver is pretty straightforward and simple and mentioned in a few docs on drupal.org, the relevant part is:

foreach ($columns as $column) {
  $route_name = 'example.column';
  $this-&gt;derivatives[$route_name] = [
    'title' =&gt; $column-&gt;getName(),
    'route_name' =&gt; $route_name,
    'route_parameters' =&gt; ['taxonomy_term' =&gt; $column-&gt;id()],
    'parent_id' =&gt; 'example.parent',
  ] + $base_plugin_definition;
}


The problem is that this code, obviously, doesn't generate more than one tab because all go to the same $route_name. But I'm not allowed to use any other route name (suffixing it with the term, for instance) because it complains about a non-existent route then.

Do I have any other solution than to generate all the routes separately, using a _route_callback? This would somehow feel wrong, going against the reason for the existence of slugs in the first place.
The array key is not the route name, it's the machine name of the local task. It's pretty common to use the same string but that's in no way a requirement.

Just use a different array key and this should work.