Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to incorporate paging into custom page?

Quote Reply
How to incorporate paging into custom page?
I'm using a global to list a user's links on a new page. I call it and pass a username into it like shown:

Code:
sub {
my $user = $_[0];
my $sth = $DB->table('Links')->select( { LinkOwner => $user, isValidated => 'Yes' } ) || return $GT::SQL::error;
my $back;
while (my $hit = $sth->fetchrow_hashref) {
$back .= Links::SiteHTML::display('link', $hit);
}
return $back;
}
I would like to use the built-in paging features to split the results up into pages. I have added the JavaScript and other code from the category page but the global needs some work to use the paging as well (I presume I need to use a loop of some sort but that is a foreign concept to me at the moment).

I've searched the forum and the help but there I can't find much information on using this feature in custom pages. Any pointers on this would be appreciated!
Subject Author Views Date
Thread How to incorporate paging into custom page? aus_dave 1184 Dec 21, 2005, 6:07 PM
Thread Re: [aus_dave] How to incorporate paging into custom page?
afinlr 1119 Dec 23, 2005, 9:55 AM
Post Re: [afinlr] How to incorporate paging into custom page?
aus_dave 1109 Dec 23, 2005, 1:34 PM