I have a content type A that is associated by node reference to content type B and C.
Content Type B and C have a taxonomy 'region'.
I have a view with a exposed taxonomy filter, where I can search for the terms 'region' of B and C, but show content type A in the result list.
This is done by setting up the views relationsship to the CCK field and associating this relationship in the exposed filter. This works fine. (Nice feature!)
But this is limited to the results in one content type (B or C). Is it possible to search in both node types B and C by one exposed filter form field? (This is the same question then for a View taxonomy term argument with the path taxonomy/region/term/number where content type A is shown with content type B and C in the bottom as references, but the region is tagged to the latter ones.)
Since the request is also about a cck views handler, this might be a following CCK Thread. But maybe there is a way to go around this limitation by a more clever way in views without writing my own relationship handler for multiple values in one.
In SQL this would be (bold is the missing part):
SELECT node.nid FROM node node LEFT JOIN node_node_data_field_reference_AtoB ON ... LEFT JOIN node_node_data_field_reference_AtoC ON ... WHERE node.type in ('TypeA') AND ( (node_node_data_field_reference_AtoB.vid OR node_node_data_field_reference_AtoC.vid) IN ( SELECT SELECT tn.vid FROM term_node tn ...
Comments
Comment #1
funkytraffic commentedAnother way: I would need some kind of UNION command for the two relationships to merge into one.
Comment #2
dawehnerIf you need such kind of special behaviour it might be useful for you to write a custom filter handler which does what you need.
UNION will probably never be supported by views itself.
Comment #3
kars-t commentedHi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.