5

I'm trying to query my nodes by using a contextual filter in views, however, I am unable to use multiple AND (+) operators and OR (-) operators at the same time. For example:

This works:

mysite.com/json/20
mysite.com/json/19+20

This does NOT work:

mysite.com/json/21,19+20
mysite.com/json/21+27,19+20
mysite.com/json/21+27/19+20

Using the "/" causes the additional arguments to be ignored. What I'm trying to tell the view is to return nodes that have a Term ID equal to either 21 or 27 AND also either have a Term ID equal to 19 or 20.

Here's my view:

enter image description here

Here's the contextual filter:

enter image description here

enter image description here

I have tried checking the "Allow multiple values" box, but it does not affect the filter at all. Does anyone have any suggestions?

2
  • I have the same problem, still searching for solution.
    – eapo
    Commented Dec 15, 2016 at 10:09
  • 1
    Stuck on this too!
    – Collins
    Commented May 23, 2017 at 8:28

1 Answer 1

0

As a workaround I have second contextual filter configured and arguments are separated with "/". In this case your /21+27/19+20 should work fine.

Still searching for the real solution.

Your Answer

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

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