You are here

function views_handler_field_tid_link in Views (for Drupal 7) 5

Display a link to a taxonomy term

File

modules/views_taxonomy.inc, line 301

Code

function views_handler_field_tid_link($fieldinfo, $fielddata, $value, $data) {
  $fieldname = $fielddata['tablename'] . '_tid';
  $term = taxonomy_get_term($data->{$fieldname});
  $path = taxonomy_term_path($term);
  return l($value, $path);
}