Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Top5 global links format?

Quote Reply
Top5 global links format?
We are trying to change the output on the Top5 global. Here is the global:

sub {
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}

On other globals we used the following formatting code:

$output .= Links::SiteHTML::display ('link', $link)

How can we incorporate this formatting in the global?
Subject Author Views Date
Thread Top5 global links format? OP 1127 Feb 2, 2004, 12:32 AM
Post Re: [OP] Top5 global links format?
afinlr 1082 Feb 2, 2004, 5:37 AM