You are here

function theme_tagclouds_list_box in TagCloud 7

Theme function that renders an entry in tagclouds/list/ views.

Parameters

$vocabulary: A full vocabulary object.

$tags: An array with weighted tag objects.

1 theme call to theme_tagclouds_list_box()
tagclouds_page_list in ./tagclouds.module
Menu callback renders a tagclouds page with listed items: each vocabulary.

File

./tagclouds.module, line 501

Code

function theme_tagclouds_list_box(array $vars) {
  if (module_exists('i18n_taxonomy')) {
    $language = i18n_language();
  }
  $vocabulary = $vars['vocabulary'];
  $tags = $vars['tags'];
  if (module_exists('i18n_taxonomy')) {
    $voc_name = i18n_taxonomy_vocabulary_name($vocabulary, $language->language);
    $voc_desc = i18n_taxonomy_vocabulary_description($vocabulary, $language->language);
  }
  else {
    $voc_name = $vocabulary->name;
    $voc_desc = $vocabulary->description;
  }
  $content = theme('tagclouds_weighted', array(
    'terms' => $tags,
  ));
  $output = '';
  if ($vocabulary->description) {
    $content = '<div>' . $voc_desc . '</div>' . $content;
  }
  $output .= '<h2>' . $voc_name . '</h2><div>' . $content . '</div>';
  return $output;
}