Contextual Filters

Drupal Views Contextual Filters OR Logic

Drupal's eyes bug out when you try either/or logic with Views Contextual Filters.

Drupal Views (standard) filters allow for AND/OR logic and groupings. However, when one wants to specify multiple CONTEXTUAL filters (previously referred to as arguments) you do NOT have contextual filters available. There is a "master thread" running on this issue located at for you to track news & progress on the issue.

In the meantime, I am having a bit of luck on most use cases by using a "Global PHP" filter in the regular filters section.

In this example, I wish to show a record if EITHER THE AUTHOR OR THE RECIPIENT FIELD equal the currently-logged-in user. My code in the "Filter code" area of the filter dialogue looks like this:


Subscribe to RSS - Contextual Filters