Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

: Links in a category and its sub categories

Quote Reply
: Links in a category and its sub categories
Hi

We have been using the following global to return a list of links in a category..

sub {
my $ID=shift;
my $table = $DB->table('CatLinks','Links');
my $sth = $table->select({ CategoryID => $ID, isValidated => 'Yes' } ) || return $GT::SQL::error;
my $output;
while (my $hit = $sth->fetchrow_hashref) {
$output.=qq~<li><a href="URLTO/detail_page.cgi?ID=$hit->{ID}">$hit->{Title}</a><br>$hit->{Description}~;
}
return $output;
}

How do we modify it to list the links in all the subcategories under that category..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Subject Author Views Date
Thread : Links in a category and its sub categories katabd 1931 Apr 2, 2005, 10:36 PM
Thread Re: [katabd] : Links in a category and its sub categories
rocco 1863 Apr 2, 2005, 11:03 PM
Post Re: [rocco] : Links in a category and its sub categories
katabd 1823 Apr 3, 2005, 7:30 PM