Use contextual filter value in a view's header "rendered entity" I want to render a Taxonomy term in a Header for a Page view which uses the Taxonomy term as a Contextual filter. I found that I can add an Entity: Rendered entity to the Header of a View, which I can set to display a Taxonomy term, but it needs an Entity ID, and I don't know how to reference the Contextual filter value.

I suppose I can use a Global: PHP or Global: View in the header to achieve this otherwise, but I wanted to know whether I can use the Rendered entity to do this.
It looks like this isn't currently possible. There's a feature request on d.o to make this work. You can achieve it with Views PHP as you mentioned by using the following code:

&lt;?php
$entity_type = 'taxonomy_term';
$id_arg = 1;
$view_mode = 'full';

if ($entity_id = $view-&gt;args[$id_arg - 1]) {
  $entity = entity_metadata_wrapper($entity_type, $entity_id);

  // Rendering without title ($page = TRUE).
  $render = $entity-&gt;view($view_mode, NULL, TRUE);

  // You may need to unset the title, even when rendering without it.
  $render[$entity_type][$entity_id]['#term']-&gt;name = NULL;
  print drupal_render($render);
}
?&gt;


Note: this code requires the entity module. Shouldn't be hard to port it to native Drupal code, but entity is rather widespread.