--- site_map.module 2007-06-05 02:04:25.000000000 -0400 +++ site_map_with_list_item_theming.module 2007-10-29 16:50:08.000000000 -0400 @@ -434,29 +434,11 @@ function _site_map_taxonomy_tree($vid, $ $output .= ''; } } + // Display the $term. $output .= '
  • '; - $term->count = taxonomy_term_count_nodes($term->tid); - if ($term->count) { - if ($cat_depth < 0) { - $output .= l($term->name, taxonomy_term_path($term), array('title' => $term->description)); - } - else { - $output .= l($term->name, "taxonomy/term/$term->tid/$cat_depth", array('title' => $term->description)); - } - } - else { - $output .= check_plain($term->name); - } - if (variable_get('site_map_show_count', 1)) { - $output .= " ($term->count)"; - } - if (variable_get('site_map_show_rss_links', 1)) { - $output .= ' '. theme('site_map_feed_icon', url("taxonomy/term/$term->tid/$rss_depth/feed")); - $output .= (module_exists('commentrss') ? ' '. theme('site_map_feed_icon', url("crss/term/$term->tid"), 'comment') : ''); - } - - + + $output .= theme('single_site_list_item', $term, $cat_depth, $rss_depth); $output .= "
  • \n"; // Reset $last_depth in preparation for the next $term. @@ -474,3 +456,39 @@ function _site_map_taxonomy_tree($vid, $ return $output; } + +/** + * allow override of data displayed for single list item. + * Only themes the vocabulary terms + * @arg term + * the term to display + * @arg cat_depth + * include this number of levels below the current term + * @ingroup themeable + */ +function theme_single_site_list_item($term, $cat_depth = "all", $rss_depth = "all") { + $output = ""; + + $term->count = taxonomy_term_count_nodes($term->tid); + if ($term->count) { + if ($cat_depth < 0) { + $output .= l($term->name, taxonomy_term_path($term), array('title' => $term->description)); + } + else { + $output .= l($term->name, "taxonomy/term/$term->tid/$cat_depth", array('title' => $term->description)); + } + } + else { + $output .= check_plain($term->name); + } + if (variable_get('site_map_show_count', 1)) { + $output .= " ($term->count)"; + } + + if (variable_get('site_map_show_rss_links', 1)) { + $output .= ' '. theme('site_map_feed_icon', url("taxonomy/term/$term->tid/$rss_depth/feed")); + $output .= (module_exists('commentrss') ? ' '. + theme('site_map_feed_icon', url("crss/term/$term->tid"), 'comment') : ''); + } + return $output; +}