Download & Extend

Filter for multiple values of CCK text field

Project:Content Construction Kit (CCK)
Version:6.x-3.x-dev
Component:Views Integration
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Please forgive (and direct to the appropriate thread) if this has already been asked and solved.

I am using D6.19. I have a content-type "Video" that has a CCK text field "Tags." "Tags" can have unlimited values such as "News" or "2011" or "Charlie Sheen" or "Crazy Rich People" or whatever.

I want to create a view that filters on "Tags." I can successfully create a view that, for example, shows all of the Items tagged "News". I can't seem to create a view that shows all the items that are tagged both "News" AND "2011" (So in this example I only want the news that happened in 2011) or "Charlie Sheen" AND "Crazy Rich People" (I want all the items about Charlie Sheen acting crazy but not the ones about Lindsay Lohan acting crazy).

I can't set the views filter to use "Contains any words" because then I will get entries that are tagged "Charlie Sheen" or "Charlie Brown" or "Crazy Rich People" or "Just Plain Crazy". If I use "Contains all words" I get no results because the mysql query is looking for any nodes that have "Charlie Sheen Crazy Rich People" in a single value of the tag field.

Am I making sense? It seems like this would be useful to others and already addressed...but I just can't figure it out.

I found this thread: http://drupal.org/node/232187 that seems to address this issue but it was marked as a duplicate of http://drupal.org/node/194818 which has a very small patch. But it seems that http://drupal.org/node/194818 only addresses D5 and the provided patch doesn't do anything for D6 (unless I am reading the patch wrong). It appears to me that the provided patch doesn't match up to any code in my version of text.module.

Comments

#1

Is there a solution to this for Drupal 7 Views 3?

#2

Yes, views 3 provides support for the OR operator.