Gossamer Forum
Quote Reply
Re: [rascal] Fix Global In reply to
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 .= "&nbsp;&nbsp;"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
Subject Author Views Date
Thread Fix Global rascal 3883 Dec 22, 2006, 10:43 PM
Thread Re: [rascal] Fix Global
SandraR 3796 Dec 23, 2006, 8:18 AM
Thread Re: [SandraR] Fix Global
rascal 3783 Dec 23, 2006, 4:30 PM
Thread Re: [rascal] Fix Global
SandraR 3778 Dec 23, 2006, 6:21 PM
Thread Re: [SandraR] Fix Global
rascal 3731 Jan 17, 2007, 9:01 PM
Thread Re: [rascal] Fix Global
tandat 3724 Jan 17, 2007, 10:20 PM
Thread Re: [tandat] Fix Global
rascal 3718 Jan 18, 2007, 8:23 AM
Thread Re: [rascal] Fix Global
tandat 3721 Jan 18, 2007, 8:37 AM
Post Re: [tandat] Fix Global
rascal 3696 Jan 18, 2007, 8:47 PM
Post Re: [rascal] Fix Global
Andy 3636 Mar 9, 2007, 12:34 AM