Get contextual filter ID in views row I've got a view with a contextual filter for an entity reference field. The contextual filter fetches the current node id from URL as filter criteria. The individual rows of the view are rendered as content in teaser view mode (not using fields), so basically it uses node--nodetype--teaser.html.twig to render the results. The view is attached to nodes using the EVA module

I now need the value of a field from the host/contextual node in node--nodetype--teaser.html.twig (the template used by the views row). I know how to query entities and fields, but I don't know which hook to use and how to get the node ID of the contextual filter.

How can I get the contextual filter ID and which hook should I use to pass the contextual filter down to the node teaser template?
Implement template_preprocess_node in your .theme file and get the page's node with the following code.

/**
 * Implements template_preprocess_node().
 */
my_theme_preprocess_node(&amp;$vars) {
  // This will fire for any node type with the teaser view mode
  if ($vars['view_mode'] == 'teaser')
    $node = \Drupal::routeMatch()-&gt;getParameter('node');
    if ($node instanceof \Drupal\node\NodeInterface) {
      // You have the full node object and can access fields as needed.
      // You can even check the $node type in the above if statement to only add
      // this value to the teaser for nodes when you're on the type with your EVA
      // Make sure to add them to the $vars array to see them in your template.
    }
  }
}


See this post re: how to access fields from a node object.

Note: This doesn't do exactly what you're asking, but will work if you're viewing the full page of the node with the EVA.