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

List all links of a category on detailed page

Quote Reply
List all links of a category on detailed page
Hi,

I have a global for version 2.x to list all links of the category on a detailed page of that category:

Code:
sub {
my $id = shift;
my $catid = $DB->table('CatLinks')->select({LinkID=>$id})->fetchrow_hashref->{CategoryID};
my $db = $DB->table('CatLinks','Links');
my $cond = GT::SQL::Condition->new(
'CatLinks.CategoryID','=',$catid,
'CatLinks.LinkID','<>',$id);
my $rs = $db->select($cond,['Links.*'])->fetchall_hashref or return;
my $output ="";
foreach(@$rs){
$output .= Links::SiteHTML::display('link',$_);
}
return $output;
}

It was from the forum:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=287757;search_string=list%20links%20category;#287757

It seems not to work with 3.x - so I need some hint to get it working.

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de