Taxonomy Term's Description
luciddrew - January 21, 2009 - 02:31
| Project: | Views 'Group-By' Pack |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is it possible to add the Taxonomy Term's Description just below the titles?

#1
Got it.
I added a couple of lines to the last function theme_taxonomygroup_term , here's the code below.
/*** Theme a list of nodes associated with a term.
* @param array $termlist array(node1, node2, ...)
* @param string $term The name of the taxonomy term.
* @param boolean $teaser Are we printing full nodes (t) or teasers (f)?
*/
function theme_taxonomygroup_term($termlist, $term, $teaser=false) {
$descArray = taxonomy_get_term_by_name($term);
$desc = $descArray[0]->description;
$output = "";
$output .= "<div id=\"taxonomygroup-{$term}-header\" class=\"taxonomygroup-header taxonomygroup-{$term}-header\">{$term}</div>";
$output .= "<div class=\"taxonomygroup-descriptions\"><div class=\"taxonomygroup-{$term}-description\">" . $desc . "</div></div>";
$output .= "<div class=\"taxonomygroup-content taxonomygroup-{$term}-content\">";
foreach ($termlist as $node) {
$output .= node_view($node, $teaser, false, true);
} // foreach month
$output .= "</div>";
return $output;
} // function theme_taxonomygroup_term