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

New links in top category

Quote Reply
New links in top category
Hello GT community,



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

how to modify this global from the resources section so that is displays the new links by top category only?

Thank you. Smile
Quote Reply
Re: [nt6] New links in top category In reply to
Hi,

What do you mean by "top category" ?
Quote Reply
Re: [Paul] New links in top category In reply to
I mean a category right under 0 or root. I would like the global to show all new additions in that category and all it's subcats. Does this make sense?
Quote Reply
Re: [nt6] New links in top category In reply to
Do you mean categories other than top-level categories?
Quote Reply
Re: [Paul] New links in top category In reply to
Yes. I mean the global looks at category 1, right under the root and displays new links in category 1 and all it's subcats. Smile Can I find this somewhere on this forum?