How do I use EVA to show a list of nodes referenced by node_reference?

I have a node type, Volume, which has a node_reference field called "papers", I want to attach a view with those papers to the Volume node. I can't work out whether I should be using a contextual filter with the argument or what not.

Comments

rwilson0429’s picture

In all of my uses of Eva, I use a contextual to filter the view based on the arguments settings under the entity content settings section. You may also will need to set the entity content settings' arguments to 'Use the ID of the entity the view is attached to' or maybe use tokens to filter.

Based on the info you provided, I would set the contextual filter to content:volume and 'When Filter Value Is Not Available", Hide the View. 'When The filter Value Is Available OR A Default Is Provided', Specify Validation Criteria of 'content' then, select 'volume' under the content type dialog. Filter value format = 'Node ID'. Action to take if filter value does not validate = 'Hide view'.

I have a node type, Volume, which has a node_reference field called "papers", I want to attach a view with those papers to the Volume node

Seems to me that the Volume content is the parent and papers content is the child in this relationship. If true then, seems that the papers content should have a reference to the volume content instead of the other way around. But if it works for you, great.

mkadin’s picture

Status: Active » Fixed

This isn't really an EVA question, but a question about views relationships. The short answer is that you need to create a listing of all of your papers. Then add a relationship from the paper to the volume. From there you should be able to add a contextual filter for the nid of the volume (make sure to you're using the volume relationship). Make sure that EVA passes the id of the volume and you should be good to go.

Please re-open this if you need further assistance.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.