List groups own content and all non-group content on groups page I building a site where some content (eg. news, events) that either belong a group (region) or not (national).

On the national part of the site I have a view in a block that presents all content filtered by type (news or events). No problem...

On the regional part(s) of the site I want to have a view that show all the news (or events) that is published by that region. This is no problem either. (OG contextual filter etc.)

But I also want to include all news that don´t belong to a region at all.... this part I can´t figure out.

What I want to happen (under the hood) in the SQL is this...

The WHERE-part that I get from Views:

WHERE ( ((og_membership_node.gid = '&lt;gid&gt;'))
  AND (( (node.status = '1') AND (node.type IN  ('news')) )) )


Change that to:

WHERE ( ((og_membership_node.gid = '&lt;gid&gt;') OR (og_membership_node.gid IS NULL))
  AND (( (node.status = '1') AND (node.type IN  ('news')) )) )


Perhaps hook_views_query_alter() or hook_views_pre_execute() can fix this...
Solved! I used hook_views_query_alter().

function MY_MODULE_views_query_alter(&amp;$view, &amp;$query) {
  if($view-&gt;name == 'VIEW_NAME') {
    foreach ($query-&gt;where as &amp;$condition_group) {
      foreach ($condition_group['conditions'] as &amp;$condition) {
        if (strpos($condition['field'], 'og_membership_node.gid') === 0) {
          $condition_group['conditions'][] = array(
            'field' =&gt; 'og_membership_node.gid',
            'value' =&gt; NULL,
            'operator' =&gt; 'is'
          );
          $condition_group['type'] = 'OR';
        }
      }
    }
  }
}