I have a node index created and have indexed the node and the taxonomy terms. I have three different vocabularies (dept, itype, topic) and within my view, I can successfully set the contextual filters to limit by ONE taxonomy (dept: term ID). By setting the path to /taxonomy/term/%, this successfully returns a beautiful list of nodes tagged with that taxonomy ID, with facets available limiting my search as well! YAY! (See attachment)
However, I can only set one vocabulary. If I try to add the other vocabularies (itype: term ID) either in the same view or within a different view, only one of the views will work, the others return blank pages.
Is there a way to set the contextual filters for any taxonomy term, not just from one vocabulary? It looks like this may be addressed here: http://drupal.org/node/111959 and it isn't really intended to work this way? It is a really nice option for the taxonomy term pages with facets, if only it would work with multiple vocabularies! Is this possible, or should I be doing this some other way?
| Comment | File | Size | Author |
|---|---|---|---|
| example with facets.jpg | 52.42 KB | magibird |
Comments
Comment #1
magibird commentedSorry -- link should be http://drupal.org/node/1119594
Comment #2
drunken monkeyNo, these problems aren't related. The linked one would enable you to search for multiple terms at once, but still all in the same field. For your use case you would either need an OR conjunction for arguments – which doesn't exist, at least for the Search API –, or, easier, a data alteration that would accumulate all of a node's terms in a single field.
The latter would just need a bit of custom code, or you can write a patch for the "Aggregated fields" data alteration to provide this as one of the options. Let me know which of those you'd prefer, if you need additional information.
Alas, I don't know of a solution with the current code, if that's what you need.
Comment #3
magibird commentedActually -- this already works. I just created an aggregated field with all my taxonomy IDs, using the Fulltext aggregation type, reindexed everything, and the option appeared as a Contextual Filter option, and it works correctly! Yay! Thanks!
Comment #4
marcoka commentedany tips on how you did that? views plugin or is this in views 3?
i want to add that to the docs
http://drupal.org/node/1368592
found it.