Show nodes related to referenced node I have 3 content types: "Files", "Actions" and "Templates".


In each "Files" node there's a entity reference to an "Actions" node
In each "Templates" node there' a entity reference to an "Actions" node


How can I setup a view that shows a list of links to "Templates" nodes on a "Files" node page, based on the entity reference to an "Actions" node for this specific "Files" node?

Edit - I couldnt get Felix' answer to work, so here's a more detailed description of my case:

I have a node called "BAG001", this node has content type "Files.
I have a node called "Procedure A1", this node has content type "Actions"
I have a node called "Form A1", this node has content type "Templates"

In "BAG001" I make an entity reference to "Procedure A1" (field name is "field_action")
In "Form A1" I make an entity reference to "Procedure A1" (field name is "field_related_action") 

On the "BAG001" page there's should be a views generated block, showing all templates related to "Procedure A1". In this case that would be "Form A1".  

I tried setting up a view using the following settings:


1) Relationship -> Entity reference: field_action
2) Relationship -> (Content entity referenced from field_action) Entity Reference: Referencing Entity [with a relationship to (1)]
3) Contextual filter -> Content: NID [with a relationship to (2)]
Create a view that shows a list of templates.
Add a relationship to the actions content type (Entity Reference: Referenced Entity via field_related_action).
Add a relationship to the files content type (Entity Reference: Referencing entity via field_related_action).
Create a contextual filter based on the current nodes nid. When you create the filter then When the filter value is NOT available select Provide default value and choose content ID from URL. Also this filter should be for the second join to the file node type.
Set that view to show in a block on each files page.