Multiple contextual filters using or statements I have a taxonomy which defines the sections of a site. One of the terms is "Global". What I am doing is creating pages with the site section term and also creating promo boxes which use the same taxonomy. By default the "Global" term is selected wherever the term relation is used. 

I would like to have a block view using contextual filters. I have set it up to use one filter which is the term id from the url. This works great but when I have a page that has a specific section but does not have any related promo boxes I would like to load the "Global" set of promo boxes. 

Is there a way to create multiple contextual filters using or statements? The default sets them up as and statements which will not allow me to load the "Global" plus the related to the page. I am sorting the view by taxonomy weight and have "Global" at the bottom so if I can get an or contextual filter I'll be in business.

Does anyone know of a module to do this or will I have to hook the view using hook_views_query_alter
In case anyone wants to know, I was able to accomplish this with some views hooks and will share my solution.

First you need to register view api information

/**
 * Implements hook_views_api().
 */
function mymodule_views_api() {
  return array(
    'api' =&gt; 3, 
  );
}


Then you need to alter the view at pre build to include the "Global" term. I am using entity query to determine if there is any content with the Global term. If so I am adding that term as an argument.

/**
 * Implements hook_views_pre_build().
 */
function mymodule_views_pre_build(&amp;$view) {
  // we were getting no results if the tid of the Global term was not 1
  // in some build instances it is not so we need to ensure that the default
  // value being passed is the actual tid of the Global term.
  if (($view-&gt;name == 'badge' || $view-&gt;name == 'promo_box' || $view-&gt;name == 'article'|| $view-&gt;name == 'tips') &amp;&amp; $view-&gt;current_display == 'block') {
    $vocabulary = taxonomy_vocabulary_machine_name_load('site_section');

    $entityQuery = new EntityFieldQuery;
    $entityQuery-&gt;entityCondition('entity_type', 'taxonomy_term')
      -&gt;propertyCondition('name', 'Global')
      -&gt;propertyCondition('vid', $vocabulary-&gt;vid)
      -&gt;range(0 ,1);

    $result = $entityQuery-&gt;execute();

    if ($result) {
      $term = array_slice($result['taxonomy_term'], 0);   
      $view-&gt;argument['tid_1']-&gt;options['default_argument_options']['argument'] = $term[0]-&gt;tid;
    }
  }
}


And finally you need to switch the where statement to and or

/**
 * Implements hook_views_query_alter().
 */
function mymodule_views_query_alter(&amp;$view, &amp;$query) {
  //  Let's find out if we are attempting to load either the badge or promo box
  //  view. If so we need to alter the where clause to include an or statement
  //  in the conditional filter to also look for the global term in the site secttion
  //  taxonomy. I was not able to find a way to create an OR condition filter via a 
  //  module so for now this is the best to do it.
  if (($view-&gt;name == 'badge' || $view-&gt;name == 'promo_box' || $view-&gt;name == 'article'|| $view-&gt;name == 'tips') &amp;&amp; $view-&gt;current_display == 'block') {
    if (isset($query-&gt;where[0]) &amp;&amp; isset($query-&gt;where[1])) {
      $query-&gt;where[0]['type'] = 'OR';  
    }
  }
}