I want to use Viewfield, where argument is value from node reference field.
Is it possible to implement it or how to set token to send NID except of name of references nodes.

Comments

danielb’s picture

sashkernel’s picture

Is there any argument that must be passed by the ViewField?
I've got similar task completed with panels, but now I want this to be in ViewField and for some reason I get blank view.

In my case, I'm trying to show related content in the view field.
- I added context filter NID and set validator to few pieces of Content
- Then, in Argument Input, I chose "from Context">Content ID.
- And finally in viewfield I set to pass Content ID.

Kind regards

jerdavis’s picture

Issue summary: View changes
Status: Active » Fixed

If you want to have the view return results from an entity reference on the same entity, you can pass [node:nid] in the tokens for arguments in the Entity Viewfield, then in your View you can add a contextual filter for Content: ID and add a relationship for your Entity's Entity Reference field. Use the relationship to drive the output by associating it with the Contextual Filter or individual fields in the View display.

Status: Fixed » Closed (fixed)

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