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

Products: Gossamer Links: Development, Plugins and Globals: Re: [katabd] PageBuilder to generate users pages...: Edit Log

Here is the list of edits for this post
Re: [katabd] PageBuilder to generate users pages...
Yes, you'll need to modify the list global slightly.

For example, if you wanted to span the users list of links (I don't have the global you are using for the list of users pages but you should be able to see the relevant bits):

sub {
my $name = shift;

my $tags = shift;
my ($output,$sth,$link);
my $db = $DB->table ('Links');
my $nh = $tags->{nh}||1;
my $mh = $tags->{maxhits}||15;
my $offset = ($nh-1) * $mh;
$db->select_options ("ORDER BY LinkOwner DESC", "LIMIT $offset, $mh");
my $sth = $db->select ( { 'LinkOwner' => $name });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}

Edit: These globals should work dynamically - I use the span global for several pages on my site with different lists. However, I'm not sure how easy it is to use the nh tag with pagebuilder. Using these dynamically is easy because the nh tag is in the url. You may need to set the nh tag in the template using another global by parsing the url but I'm not sure about this.

Last edited by:

afinlr: Aug 10, 2003, 4:38 AM

Edit Log: