I have two content types called Basic Page and Contact Info.
- There are around 5 nodes from Contact Info with some contact info (phone/fax/email/IM) in the body field.
- In Basic Page content type there's an Entity Reference field that refers to Contact Info. So that for each page there would be a main contact person. When someone create a Basic Page node they can pick a Contact Info node from the dropdown (out of the 5 Contact Info nodes).
Basic Page -> Contact Info (Basic Page content type refers to Contact Info content type)
Then I created a block view (added to the sidebar of Basic pages) which displays the contact info associated with that node.
Added a Relationship in the view (Entity Reference: Referenced Entity)
Right now it's displaying all 5 contact info nodes, not just the one associated with that particular basic page node. I tried to tweak the Contextual filter and relationships but couldn't get it to work.
I have a feeling that the solution lies in the php code that goes in Provide default value -> php code section.
Any help appreciated. Thanks