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

Re: [klauslovgreen] Category list issue

Quote Reply
Re: [klauslovgreen] Category list issue In reply to
Something like this?

sub {
my ($all_ids,@list);

my $tags = shift
my $cat_id = $tags->{ID};
$all_ids = $DB->table('Category')->children($cat_id);
push @$all_ids, $cat_id;
my $link_db = $DB->table('Links','CatLinks','Category');
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','CategoryID', 'IN', \@$all_ids);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
push @list, $link;
}

my $output;
foreach my $link (@list) {
$output .= qq~<li><a href="$CFG->{db_cgi_url}/jump.cgi?ID=$link->{ID}">$link->{'Title'}</a>~;
}

return $output;

}
Subject Author Views Date
Thread Category list issue gotze 5110 Apr 16, 2003, 12:17 PM
Thread Re: [gotze] Category list issue
klauslovgreen 5004 Apr 16, 2003, 12:51 PM
Thread Re: [klauslovgreen] Category list issue
afinlr 4978 Apr 16, 2003, 4:34 PM
Thread Re: [afinlr] Category list issue
klauslovgreen 4970 Apr 17, 2003, 1:05 AM
Post Re: [klauslovgreen] Category list issue
gotze 4954 Apr 17, 2003, 3:44 AM
Thread Re: [gotze] Category list issue
afinlr 4937 Apr 17, 2003, 4:09 AM
Thread Re: [afinlr] Category list issue
gotze 4935 Apr 17, 2003, 4:40 AM
Thread Re: [gotze] Category list issue
afinlr 4941 Apr 17, 2003, 5:23 AM
Thread Re: [afinlr] Category list issue
gotze 4954 Apr 17, 2003, 6:16 AM
Thread Re: [gotze] Category list issue
webmaster33 4899 Apr 20, 2003, 8:58 AM
Thread Re: [webmaster33] Category list issue
gotze 4916 Apr 20, 2003, 9:03 AM
Post Re: [gotze] Category list issue
webmaster33 4901 Apr 20, 2003, 9:19 AM