Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal 8 equivalent of taxonomy term converted to term id views

So in Drupal 7 it was very easy to pass a taxonomy term by name as a contextual filter and it USED to have the option of convert term name to id. What's the equivalent of that in Drupal 8? I've tried the validator as "taxonomy term name" and it doesn't work. When I try to pass it by name I get nothing, but when I do ID it works. So I don't understand how to pass the actual taxonomy term name as the filter.

like image 307
user1470118 Avatar asked Dec 24 '22 07:12

user1470118


1 Answers

You first have to create a relation with the taxonomy terms by adding the relationship with the taxonomy list or Taxonomy terms on node. Once you have added the relation, you can now add a contextual filter called name with the category Taxonomy term. This way you can pass the taxonomy term by name to the filter.

like image 157
Laurens Avatar answered Dec 31 '22 13:12

Laurens