Views Relationship/Contextual Filter for sibling nodes I have a content type 'property' and a content type 'park'. I'm using an Entity Reference field in the property to reference a park. The park is essentially a parent or neighborhood or that contains the property.

On the property page, I want to display the sibling properties (the ones that share a common park/parent). I'm able to show child properties on the park page, but can't for the life of me figure out the relationship/contextual filter combo to use to get this working. I see many examples online that use taxonomy, but this is an entity reference relationship. Setting up a relationship I have options for Entity Reference: Referenced Entity - A bridge to the Content entity that is referenced via field_master_park and Entity Reference: Referencing entity - A bridge to the Content entity that is referencing Content via field_master_park and I assume I use (at least) one of these combined with a contextual filter? 

Anyone able to at least point me in the right direction?
There are two ways to do this that come to mind:

Option One

You could create a node template for nodes of type property and use an Entity Field Query in a manner roughly following this pseudo-code:

  $park = $node-&gt;field_park['value'];
  $query = new EntityFieldQuery();
  $query
     -&gt;entityCondition('entity_type', 'node')
    -&gt;entityCondition('bundle', 'property')
    -&gt;propertyCondition('status', 1)
    -&gt;propertyOrderBy('created', 'DESC')
    -&gt;fieldCondition('field_park', $park)
    -&gt;range(0,10);
$result = $query-&gt;execute();


This will load a list the NIDs of all nodes that have field_park matching the value of $node->field_park['value'] (or wherever the node object stores your actual field value). To get more info than just the NID, you will want to do some kind of foreach($result) that does a node_load($nid) on each NID returned by the EFQ.

Option Two

Option two is no-code: you could create a View and embed it on your node with something like Insert View. You would create the view with the following steps:


Add a contextual filter that takes the node ID. This is so you can pass it a value so you get a view specific to each node you want it to appear on. Exactly how to do this is out of the scope of this question.
Add a field for the node title. You can remove this later but it will keep you from getting confused while making the view. Give it a label if you want, make it grouping field number one, and exclude it from the view. 
Add a relationship. Choose "Entity Reference" for the relationship type, and then select "entity that is referenced via field_park" or whatever your node reference field is called.
Add another content: title field. Under relationship, choose the relationship you just created. Set it to group by that field, create a label called "park:", and set it to exclude from display.
Add another relationship. Choose type "Entity Reference" and this time choose "referencing entity": "entity that is referencing Content via field_park"
Add another field for node: title and this time select the relationship you just created. Give it a label like, "sister property:" if you want. 


Violá. Now you have a view that will allow you to pass an NID and will tell you the title of that property, its park, and all sister properties.