You are here

function glossary_term in Glossary 5.2

Same name and namespace in other branches
  1. 5 glossary.module \glossary_term()
  2. 6 glossary.module \glossary_term()
  3. 7 glossary.module \glossary_term()
1 string reference to 'glossary_term'
glossary_menu in ./glossary.module
Implementation of hook_menu().

File

./glossary.module, line 343
Glossary terms will be automatically marked with links to their descriptions.

Code

function glossary_term($tid) {
  $result = db_query(db_rewrite_sql('SELECT td.* FROM {term_data} td WHERE td.tid=%d', 'td', 'tid'), $tid);
  $output .= '<div class="glossary-list">' . "\n";
  while ($row = db_fetch_object($result)) {
    $term = taxonomy_get_term($row->tid);
    drupal_set_title(check_plain($term->name));
    $output .= '<dl>' . theme('glossary_overview_item', $term, TRUE) . '</dl>';
    $vid = $row->vid;
  }
  $output .= "</div>\n";
  $tree = taxonomy_get_tree($vid);
  $alphabar = _glossary_alphabar($vid, $tree);
  $output = $alphabar . '<br/>' . $output;
  return $output;
}