Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2011 at 00:34 UTC
Updated:
29 Jun 2012 at 16:51 UTC
I would like to create a view that returns results based on an OR relationship between the arguments i.e. if I have a view that returns nodes that have a field "ID' and I send in the arguments 'foo' and 'bar', the view should return any node with 'foo' OR 'bar' in the field ID.
Having read the prior support requests, I understand that this is not going to be standard functionality anytime soon but since I have a very specific situation, I would like to know if there are any hacks I can employ to get this result. It does not need to be pretty or work for every situation, I just need it to work for the use case I have described above.
Thanks
Comments
Comment #1
dawehnerIn general this will probably only work with creating some custom code :(
To be able to achieve this you could perhaps do several things, for example use hook_views_query_alter and change the AND between the two arguments to an OR. The probably more clean version would be some argument handlers which work together but i think this is probably hard.
Comment #2
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.