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?
1 Answer
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– Sumit Madan2014-12-02 10:17:09 +00:00Commented Dec 2, 2014 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+Nway would work, combined with a group on person field. The taxonomy terms areLEFT 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– artfulrobot2014-12-02 11:01:06 +00:00Commented Dec 2, 2014 at 11:01 - Oh I missed it. It was an old post.Sumit Madan– Sumit Madan2014-12-02 11:03:04 +00:00Commented Dec 2, 2014 at 11:03