You are here

function views_handler_argument_term_node_tid::summary_argument in Views (for Drupal 7) 6.3

Provide the argument to use to link from the summary to the next level; this will be called once per row of a summary, and used as part of $view->get_url().

Parameters

$data: The query results for the row.

Overrides views_handler_argument_many_to_one::summary_argument

File

modules/taxonomy/views_handler_argument_term_node_tid.inc, line 50

Class

views_handler_argument_term_node_tid
Allow taxonomy term ID(s) as argument.

Code

function summary_argument($data) {
  if (!empty($this->options['use_synonym_for_summary_links'])) {
    $synonym = db_result(db_query_range("SELECT name FROM {term_synonym} WHERE tid = %d", $data->{$this->base_alias}, 0, 1));
    if (!empty($synonym)) {
      return $synonym;
    }
  }
  return $data->{$this->base_alias};
}