I have a view page that displays a group of content fields. Attached to the content type there is a taxonomy term field.

How do I get contextual filters to recognize second path component of the URL and then filter it against the taxonomy terms on the page views? See attached images

Contextual filter

view page

  • Where does the second path component of the URL come from? (Path auto, manual URL alias, menu tree, term, parent term?) – eye-wonder Oct 24 '17 at 12:40

You can do this approach:

First create a views and add a path with wildcard enter image description here

Second add a contextual filter Content: Has taxonomy term ID and do this: enter image description here enter image description here enter image description here

Third test it, type the path name of your taxonomy and hit update preview. enter image description here

I hope this helps you.

| improve this answer | |
  • Thanks, this really helps me understand contextual filters in views – purencool Oct 30 '17 at 1:26

You have to create a relationship to your taxonomy, and on your view path you can specify which field you want to use to filter. You also have to add a contextual filter to your view.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.