You might want to ask Andy: This is the code I use but not for the drop down and it bolds the main category and number of links.... Andy is good at combining the global.
=================================================
sub {
# -------------------------------------------------------------------
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Full_Name');
my $sth = $cat_db->select (['Full_Name','ID','Name','CatDepth','Number_of_Links','Has_New_Links','Has_Changed_Links'] );
my $output=qq~<table width="100%"><tr valign=top><td width="50%"><table>~;
my $i=0;
while (my ($cat,$ID,$heading,$depth,$cnt,$new,$changed) = $sth->fetchrow_array) {
$i++;
my $url1 = $cat_db->as_url($cat);
$output.= qq~<tr><td>~;
my $depth = ($cat =~ tr/\///);
if ($depth > 0){
$output .= " "x$depth."<font size=-1>";
} else { $output.="<b>"; }
$output.=qq~<a href="$CFG->{build_root_url}/$url1" class="toc">$heading</a> ($cnt)~;
if ($new eq "Yes") { $output .= qq| <span class="new-item"><span>new</span></span> |; }
if ($changed eq "Yes") { $output .= qq| <span class="updated-item"><span>updated</span></span> |; }
if ($depth > 0){
$output .= "</font>";
} else {$output.="</b>";}
$output.=qq~</td></tr>~;
if (($i eq '90')){ $output.=qq~</table></td><td width="50%"><table align=top>~;}
}
$output.="</table></td></tr></table>";
return $output;
}
Sandra Roussel
Chonsa Group Design - Fresh Start Housing
=================================================
sub {
# -------------------------------------------------------------------
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Full_Name');
my $sth = $cat_db->select (['Full_Name','ID','Name','CatDepth','Number_of_Links','Has_New_Links','Has_Changed_Links'] );
my $output=qq~<table width="100%"><tr valign=top><td width="50%"><table>~;
my $i=0;
while (my ($cat,$ID,$heading,$depth,$cnt,$new,$changed) = $sth->fetchrow_array) {
$i++;
my $url1 = $cat_db->as_url($cat);
$output.= qq~<tr><td>~;
my $depth = ($cat =~ tr/\///);
if ($depth > 0){
$output .= " "x$depth."<font size=-1>";
} else { $output.="<b>"; }
$output.=qq~<a href="$CFG->{build_root_url}/$url1" class="toc">$heading</a> ($cnt)~;
if ($new eq "Yes") { $output .= qq| <span class="new-item"><span>new</span></span> |; }
if ($changed eq "Yes") { $output .= qq| <span class="updated-item"><span>updated</span></span> |; }
if ($depth > 0){
$output .= "</font>";
} else {$output.="</b>";}
$output.=qq~</td></tr>~;
if (($i eq '90')){ $output.=qq~</table></td><td width="50%"><table align=top>~;}
}
$output.="</table></td></tr></table>";
return $output;
}
Sandra Roussel
Chonsa Group Design - Fresh Start Housing