You are here

function theme_taxonomy_list_block in Taxonomy List 6.2

Same name and namespace in other branches
  1. 5.2 taxonomy_list.module \theme_taxonomy_list_block()
  2. 7 taxonomy_list.module \theme_taxonomy_list_block()

Theme tree for a block.

Parameters

$terms: the enhanced term tree.

Return value

the themed list to be displayed.

1 call to theme_taxonomy_list_block()
taxonomy_list_block in ./taxonomy_list.module
Implementation of hook_block().

File

./taxonomy_list.module, line 781
List all terms in a vocabulary.

Code

function theme_taxonomy_list_block($terms) {
  $items = array();
  $odd_even = array(
    'even',
    'odd',
  );
  $i = 0;
  foreach ($terms as $tid => $term) {
    ++$i;
    $items[] = array(
      'data' => theme('taxonomy_list_term_block', $term),
      'class' => $odd_even[$i & 1],
    );
  }
  return theme('item_list', $items, NULL, 'ul', array(
    'class' => 'taxonomy-list-block',
  ));
}