Change the path used by a route dynamically Taxonomy terms have a canonical path of /taxonomy/term/{taxonomy_term} by default, which displays a View with content tagged with that term.
For certain taxonomies I would like to use a different view, dependent on the taxonomy bundle, so I can't just override the path entirely.
For example, &quot;article&quot; tags should link to /articles/{taxonomy_term}, &quot;product&quot; tags to /products/{taxonomy_term}.
My idea is to override the entity.taxonomy_term.canonical route adding some kind of callback that generates the path dynamically based on the taxonomy_term. Is this possible?
I don't believe that there is any need for custom route manipulation in your case, and besides, while I am not entirely sure, I don't think that something like what you describe, would actually work, since then you might have issues with the view's contextual filtering.
I believe the TVI Module is the answer to your problem. It can be used to specify the view/views that will be used in the vocabularies of your choice.