Hi
I have been using a global to generate a site map for my directory:
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'] );
my $output=qq~<table><tr valign=top><td width="25%"><table>~;
my $i=0;
while (my ($cat,$ID,$heading) = $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>~;
if ($depth > 0){$output .= "</font>";}
else {$output.="</b>";}
$output.=qq~</td></tr>~;
if (($i eq '13')or ($i eq '19') or ($i eq '33') or ($i eq '40')){ $output.=qq~</table></td><td width="25%"><table align=top>~;}
}
$output.="</table></td></tr></table>";
return $output;
}
I think it was suggested by Laura a while back..
I need to make that global return a one column ONLY that has the list in it and I want the list to include the top 2 levels of Categories only?
Have anyone had luck doing so? and have any idea on how to?
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
I have been using a global to generate a site map for my directory:
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'] );
my $output=qq~<table><tr valign=top><td width="25%"><table>~;
my $i=0;
while (my ($cat,$ID,$heading) = $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>~;
if ($depth > 0){$output .= "</font>";}
else {$output.="</b>";}
$output.=qq~</td></tr>~;
if (($i eq '13')or ($i eq '19') or ($i eq '33') or ($i eq '40')){ $output.=qq~</table></td><td width="25%"><table align=top>~;}
}
$output.="</table></td></tr></table>";
return $output;
}
I think it was suggested by Laura a while back..
I need to make that global return a one column ONLY that has the list in it and I want the list to include the top 2 levels of Categories only?
Have anyone had luck doing so? and have any idea on how to?
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory