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

Links Spanning Pages - HOW?

Quote Reply
Links Spanning Pages - HOW?
I have added a mod that will show ALL the links from the subcategories in their mother category. Its working fine except for one problem. It will show ALL the links without spanning the links into multiple pages. So, if you have total of 500 links in the subcategories, all of them will be shown in ONE page in the mother category. Please help me in modifying the global code to add this feature.

The code used now:
Code:


sub {
my $output;
my $tags = shift;

return '' unless ($tags->{ShowSubCategoryLinks});
my $cat_id = $tags->{ID};
my $subcats = $DB->table('Category')->children($cat_id);
push @$subcats, $cat_id;
my $link_db = $DB->table('Links','CatLinks');
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','CategoryID', 'IN', $subcats);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
$output .= qq~<li><a href="$CFG->{db_cgi_url}/jump.cgi?ID=$link->{ID}">$link->{'Title'}~;
}
return $output;
}

Last edited by:

Essam: Jun 27, 2004, 12:00 AM
Subject Author Views Date
Thread Links Spanning Pages - HOW? Essam 1637 Jun 27, 2004, 12:00 AM
Post Re: [Essam] Links Spanning Pages - HOW?
afinlr 1552 Jun 27, 2004, 6:44 AM