0

I have a view that receives two variables like my-view-url/%/%. In a menu I have created a url something like my-view-url/animals/dogs. How do I get the contextual filter to see the second variable dogs and ignore animals.

The contextual filter is set to "Content: Has taxonomy term ID (with depth)" and I convert the taxonomy term to an id.

It think it must have something to depth but I am not sure.

1 Answer 1

2

This option is available out of the box in view contextual filter settings. You can able to choose input to the contextual filter using checkbox setting "WHEN THE FILTER VALUE is not in the URL". Select Provide default value from URL and choose path component. In your case it is 3. See below screenshot for example.

enter image description here

1
  • For completeness I think you should amend your answer and explain the Global: Null contextual filter's use as well. Oct 27, 2014 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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