You are here

function theme_glossify_term in Glossify 5

Same name and namespace in other branches
  1. 6.3 glossify.module \theme_glossify_term()
  2. 6 glossify.module \theme_glossify_term()
1 theme call to theme_glossify_term()
glossify_nodeapi in ./glossify.module

File

./glossify.module, line 146

Code

function theme_glossify_term($nid, $glossify_style) {

  // outputs proper div so hovertip will work
  $term = node_load($nid);
  switch ($glossify_style) {
    case 'reference':
      $output = '<dt>' . $term->title . '</dt>';
      $output .= '<dd>' . $term->body . '</dd>';
      break;
    case 'hovertip':
    default:
      $output = '<div id="' . $term->title . '" class="hovertip" style="display: none;">';
      $output .= '<h1>' . $term->title . '</h1>';
      $output .= '<p>' . $term->body . '</p>';
      $output .= '</div><!-- glossifyterm -->';
      break;
  }

  // endswitch glossify style
  return $output;
}