Anyone know how to filter by multiple tags at once?

Events happening in the community are now at Drupal community events on www.drupal.org.
hammiesink's picture

I'm trying to create an image gallery that would do the following:

Have all photos showing. Have a list of all current tags (from just one vocabulary) in a sidebar. Allow users to checkmark the tags they want to look at. Have the gallery narrow down to just the photos with at least those tags.

Comments

davemaxg's picture

For the view you'll want to use termIDs for the argument. I don't think you can specify multiple tags any other way. An easy way to create the UI you described would be to write a little javascript to construct the proper URL for ANDing or ORing the terms based on the check boxes.

Better Exposed Filters

chellman's picture

You didn't say what version of Drupal, whether you're using Views (and if so, what version). Assuming you are using Views, are you using exposed filters or arguments? I'd probably try to do this with exposed filters if possible, in conjunction with a module like these:

http://drupal.org/project/better_exposed_filters
http://drupal.org/project/sexy_exposed

Drupal 6, but to be honest it

hammiesink's picture

Drupal 6, but to be honest it doesn't even have to be Drupal at all. I looked into some open source image galleries, but none of them support filtering down by multiple tags. That's really all I need.

I am only slightly famililar with Views, so if that's the key I'll have to bone up. :)

Unless, someone can think of a non-Drupal way of doing this...

Taxonomy Filter?

btmash's picture

Have you looked at the taxonomy filter module (http://drupal.org/project/taxonomy_filter) ?

Yes

rjbrown99's picture

Drupal + ApacheSolr + ApacheSolr Views + Taxonomy + a lot of customization will get you there. It's not simple but it works quite well, especially at scale.