0

I have a content type with a taxonomy field that allows multiple values (a set of positions within the organization). I'm trying to create a view of some of these positions by passing a contextual filter via the URL. I can make a hard coded filter for a specific position by entering a filter criteria that says the field must be one of whatever position I'm looking for. However, when I try using a contextual filter instead, nothing is returned. I'm guessing it's because the contextual filter is not using a "one of" comparison. How do I create a filter that will display content types with the given position from the URL?

  • After some more investigation, I see that this isn't possible. – Robbert Mar 30 '13 at 4:24
3

Should be possible with View → Advanced → Your Contextual Filter → More → Allow Multiple Values.

Then supply values like "123+456" to get all that have either tid 123 or 456, or values like "123,456" if you only want those that have both terms applied.

Note this does not scale well because of the way Views does its SQL

  • That option is used if you want to use multiple arguments. He is asking for the multi value field. – Sumit Madan Dec 2 '14 at 10:17
  • Well, yes OP was asking about multiple arguments ("create a view of some of these positions" -- note plural) any of which match a multi-value field. So both. Actually I would have thought that the N+N+N way would work, combined with a group on person field. The taxonomy terms are LEFT JOINed so this will result in potentially multiple rows per node (if one person has or has had several positions that the query is for), which can be fixed by the group. – artfulrobot Dec 2 '14 at 11:01
  • Oh I missed it. It was an old post. – Sumit Madan Dec 2 '14 at 11:03

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.