I have the following situation:

I have 2 content types (session and preformance)

Performance has an entity reference to session

I want to create a view that shows me all performances for the session that is referenced by the performance i am looking at right now.

So this is a contextual view that filters on the nid of the performance, and has a relation to the session that is referenced by the viewed performance.

I cannot get the target_id of the session (from field_session on content type performance) to be passed in as a contextual filter.

I tried to use %node:field_session, but that gives me the label of the session, and not the target_id.

I also tried to change the display of the performance content type->field_session to 'entity id', but no luck.

All suggestions are very welcome.

1 Answer 1


You need to add the proper Context to the variant.

enter image description here

Then you complete the setup.

enter image description here

And lastly you select it in the panel settings for the Contextual view:

enter image description here

  • Dear J.Reynolds, Thanks so much for this very clear explanation! I did not fully understand where in my view i can find the last stem to select the sessions contextual filter. I can't seem to find it in my contextual filters config on the view. Ps: Its a views content pane.
    – Guardian
    Dec 10, 2014 at 14:39
  • Dear J.Reynolds, I figured it out, i think :-) I now have it working as follows: On my page variant i added the context as described and added the %session_node:nid in my argument input on pane config. What i dont understand is that on the context screen of my page variant, when i look at %session_node, i also see fields that are not attached to that content type? (not a problem at this point, but i want to fully understand). Thanks again!!!
    – Guardian
    Dec 10, 2014 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.