0
votes

I have a taxonomy of 'Market' and on that taxonomy's page, I am using a view. Inside that view, I would like a heading that prints out the taxonomy of the page but I cannot figure out how to access the taxonomy term inside the Views tempate.

1
use preprocess , drupal_set_title functions api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/… - Fky

1 Answers

-1
votes

In View template you get Taxonomy page data through arguments.

if(arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))){
  $term_id = arg(2); // Your Term Id
  // if you fetch more data then load the taxonomy
  $term_obj = taxonomy_term_load($term_id);
  print "<pre>";
  print_r($term_obj);
  print "</pre>";
}