Taxonomy Help
azwildcat - May 22, 2009 - 01:00
Hi,
Is there a way I can join a location with a category? If a user writes something about say, a hotel, that review should be associated with a particular location. It would be imprudent to list all hotels since there are so many. Rather, site visitors should be able to filter all hotels by their respective locations. I think the best way to do this is by creating two different vocabularies: “Industry” and “Location.” A term in “Industry” would be “Hotels” and a term in “Location” would be “Las Vegas.” Now, how would I join two different terms from two different vocabularies? And, is this the best way to do something like this? Thanks.

Joined?
I don't think they would need to be joined in order to be filtered by site visitors in the way you describe (unless I'm missing some part of your question - if so, please clarify!) Each node you're tagging would just need to have one term from each vocabulary, so maybe make them both required for node creation. Then, when site visitors are browsing your nodes, use a filtering mechanism like a Views summary or a faceted search module to allow this type of discovery.
For example: if you created a View that showed all nodes with the taxonomy term "hotels" (or some number or a paged view of them) that took the argument of the "location" taxonomy, and you set the "no argument present" value to a summary, your viewers, once they were seeing that view, could click the location to explore into hotels in a particular location. I think you could also do something similar using Views exposed filters.
Another example: if you use the Faceted Search or the Apache SOLR search modules after a user enters a search query, you can present these two vocabularies as filters so your users can narrow their search results to one or both of these two vocabularies.