Relationship between node and other nodes related by node reference to same parent I've been stuck on this all day and I need help.

I have a video node that has a relationship (node reference) with a playlist node.

There are multiple videos referencing that playlist and there are multiple playlists.

Now here is my issue...

I have my node that plays my video and a view that lists all other videos in the same playlist to the bottom of the node. The views display plugin i'm using is EVA: Entity Views Attachment. This works apart form the fact I don't know now to filter it to only show a list of videos that are in the same playlist (referencing the same playlist node). I am able to get the ID or tokens (eg: field_video_playlist) from the video node and pass as an argument but when I setup contextual filter and relationships in the EVA view it returns nothing. 

Without the contextual filter and relationship in the view it returns ALL videos.

Any help with this would be very much appreciated.

C
Start with a view that lists Content of type video. 

In the ENTITY CONTENT SETTINGS use:

Entity type: Node
Bundles: Video
Arguments: Use the ID of the entity the view is attached to.


This adds the EVA field to all nodes of type Video and provide the node id to Views. I suppose you have gotten about this far.

Now add a contextual filter to the View, and choose the Content: nid. This value will be populated by EVA as just specified in the arguments. This makes the view aware of the node we are currently viewing. If you want to hide the current node from the playlist, you can select exclude hidden behind the more fieldgroup.

Then add a relationships from the playlist back to the video called Entity Reference: Referencing entity.

This includes all other video nodes associated with the same playlist in the view. 



As you can see in my preview, when I view Video 1 (node id 2 because 1 was for the playlist), I see the other 2 videos in the playlist (I chose to hide the current node in the contextual filter).

If you DO want to include the current video in the view (you left exclude unchecked) it becomes a bit more complicated as you will need to use an extra relation: Entity Reference: Referenced entity. Then alter the other reference to use the reference of this one (you might have to change the order).

Then make sure all your fields and filter make use of the last relationship, so they display the title of the attached nodes and not the title of the initial node. It should look something like this: