Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
This is a simple little block that displays a list of terms in a vocabulary as a list of links to /taxonomy/term/tid pages. Items are listed in the order set for the vocabulary. You could probably use the php sort() function to change that if desired.
Be sure to change the $vid to reflect the vocabulary id of the vocabulary you wish to list. Also, you can change the "taxonomy/term/$term->tid" to any path you wish.
/**
* Lists terms for a specific vocabulary without descriptions.
* Each term links to the corresponding /taxonomy/term/tid listing page.
*/
$vid = 1;
$items = array();
$terms = taxonomy_get_tree($vid, 0, -1, 1);
foreach($terms as $term) {
$items[]= l($term->name, "taxonomy/term/$term->tid");
}
if(count($items)) {
return theme('item_list', $items);
}