I think this is reasonable =) Instead of tagadelic_tags_lists() having the output code in there, I propose moving that to a theme() function... something like this?
/**
* API function that returns the tags of a node in fancy titled lists
* @param $node. A node object.
*/
function tagadelic_tags_lists($node) {
return theme('tagadelic_tags_lists', $node);
}
/**
* Theming function that returns the tags of a node in fancy titled lists
* @param $node. A node object.
*/
function theme_tagadelic_tags_lists($node) {
if (is_array($node->tags)) {
foreach($node->tags as $vid => $terms) {
$vocabulary = taxonomy_get_vocabulary($vid);
$title = l(t($vocabulary->name), "tagadelic/chunk/$vid");
$items = array();
foreach ($terms as $term) {
$items[] = l($term->name, taxonomy_term_path($term), array('title' => t('view all posts tagged with "@tag"', array('@tag' => $term->name))));
}
$output .= theme('item_list', $items, $title);
}
return $output;
}
}
Comments
Comment #1
janusman commentedBump! Should I issue a patch??
Comment #2
Bèr Kessels commentedhttp://drupal.org/node/253514