문제

I have two views in Drupal 8.

  1. The standard Taxonomy term (content) view, path: /taxonomy/term/%
  2. My custom view for just one term at path: /term-alias

When I go to my custom term, I see the view for all terms (#1), when I want to force it to #2. How can I do that?

도움이 되었습니까?

해결책

Use the internal path of the term:

/taxonomy/term/123

Route matching operates only on internal (unaliased) paths and route #2 having more fixed parts wins.

See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Routing%21RouteCompiler.php/function/RouteCompiler%3A%3AgetFit/9.0.x

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 drupal.stackexchange
scroll top