Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Last 5 links for category

Quote Reply
Last 5 links for category
I want display last 5 link for category..
in the category page, but not last 5 link total
How I can Do it?
Thanks in andvance
Bye From Italy
Fabio

Fabio
Quote Reply
Re: Last 5 links for category In reply to
Hi,

What exactly do you mean?....New links are already on each category page Smile

Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Last 5 links for category In reply to
I want create a mod for last link added for category and not last link for all category
do U understand me?
Thanks in advance
Bye from Italy
Fabio

Fabio
Quote Reply
Re: Last 5 links for category In reply to
try it

sub {
my ($rec) = @_;
my $id = $rec->{ID};
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY ID DESC', 'LIMIT 5');
my $sth = $db->select ( { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes'} );

my $toplink;
while (my ($id,$name,$url) = $sth->fetchrow_array) {

$toplink .= "<li><a href='$url'>$name</a>

";
}
return $toplink;
}

Quote Reply
Re: [ngs] Last 5 links for category In reply to
Nice tool.

How to I change the url to detailed_url?

Kjetil
..........................
Kjetil Palmquist
www.svanger.com

Last edited by:

kjetilpa: Jul 31, 2002, 2:56 AM
Quote Reply
Re: [kjetilpa] Last 5 links for category In reply to
change the <a href="$url"> to <a href="$build_detail_url/$id.html">

or something like that
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Jul 31, 2002, 12:11 PM