filterdrupal-7vieworganic-groups

Drupal 7 Views Multiple Contextual Filters


I'm running Drupal 7 with Organic Groups. I cloned the "OG all user group content" view added an Entity Reference to it to be used as a field in one of my content types. My question is:

How can I use an additional contextual filter (Content Type) so that I can add an Argument to the Entity Reference field?

Entering the content type name isn't working: 1/article for example.


Solution

  • So I got the answer from:

    https://drupal.stackexchange.com/questions/53861/how-to-show-nodes-of-a-content-type-using-contextual-filters-as-filters

    Adding "Content Type" contextually typically requires a Node ID however; using PHP Code you can simply add:

    return TRUE;
    

    and this will allow you to enter the content type name (the physical name; i.e. OpenLayers Location field is named Location but the physical path is ol_locator_location).