Show name of the taxonomy filtered by in views block title I have an 'articles' content type with a node reference field that allows you to select a term from the taxonomy 'category'. I have a views block that gets all the a contextual filter to return the titles of all the 'articles' with the same category as the article being viewed. I would like the title of the views block to read 'More name of category articles'. I have tried using 'More %1 articles', but this returns 'More 15 articles'. I'm guessing that this is the taxonomy term number? 

Is there a way get the taxonomy name filtered by and use it in the view title? This would be really elegant. I guess the alternative would be to do something with the views 'header' and hide the views title?

Thank you in advance.
Yes, you can get the taxonomy term name and use it in the view title.
It's possible with the contextual filter settings. You can achieve your goal in two ways:


  Option #1 ( Using "%1" for the first argument, "%2" for the second, etc. )


When the filter value IS available or a default is provided:

Override title -> More %1 articles

Specify validation criteria -> Taxonomy term

Filter value type -> Term ID

Action to take if filter value does not validate -> Hide view


  Option #2 ( using PHP code )


When the filter value IS available or a default is provided:

Override title -> check this option, but leave text field empty.

Specify validation criteria -> PHP Code

Enter the code:

$tid = $handler-&gt;argument;
$term = taxonomy_term_load($tid);
if ($term){
  $name = $term-&gt;name;
  $handler-&gt;options['title'] = "More $name articles";
  return true;
}
else{
  return false;
}


Action to take if filter value does not validate -> Hide view