Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how to retreive only the Title (linked) from recents?

Quote Reply
how to retreive only the Title (linked) from recents?
Actually I am using the following global to display on main page the recents 10 links:

sub {
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ID DESC Limit 10');
$sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}

What if i need to display ONLY the "Title" of these 10 links???

Waiting to hear from you.

Thanks
Antoine
Quote Reply
Re: [antoined] how to retreive only the Title (linked) from recents? In reply to
In Reply To:
Actually I am using the following global to display on main page the recents 10 links:

sub {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;


You need a new template like short_link.html where you
declare the link output. Then you have to change the code
above from 'link' to 'short_link'. You can use any <%FIELDNAME%>
in your template.


Best regards from
Bremen/Germany

Lothar
Quote Reply
Re: [eljot] how to retreive only the Title (linked) from recents? In reply to
Thank you very much, it works.

Best Regards from
Rome/Italy

Antoine