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

Latest links on home page

Quote Reply
Latest links on home page
Hi there,

I am setting up a global to display links on the home page. I found this in the forum which works great EXCEPT I am using detailed pages for some of my links and this global does not recognise this tag (Unknown Tag: 'detailed_url')

what do I need to add/change to do this? FYI... I am fairly new to this so I do not fully understand whats going on in the sub...

Sub: latest_links

sub {
my ($cat_id,$all_ids,@list,$output,$link_db,$condition);
$cat_id = shift;
$all_ids = $DB->table('Category')->children($cat_id);
push @$all_ids, $cat_id;
$link_db = $DB->table('Links','CatLinks','Category');
$link_db->select_options ("ORDER BY Add_Date DESC LIMIT 5");
$condition = GT::SQL::Condition->new( 'isValidated','=','Yes','isNew','=','Yes','CategoryID', 'IN', \@$all_ids);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link_homenew', $link);
}
return $output;
}

Called on page using: <%latest_links('76')%>

76 - is the category to show new links from

Many thanks
Subject Author Views Date
Thread Latest links on home page aquaman 5048 Jul 27, 2005, 11:40 AM
Thread Re: [aquaman] Latest links on home page
aquaman 4960 Jul 29, 2005, 2:15 AM
Post Re: [aquaman] Latest links on home page
afinlr 4912 Jul 29, 2005, 1:47 PM
Post Re: [aquaman] Latest links on home page
webmaster33 4911 Jul 29, 2005, 5:27 PM
Thread Re: [aquaman] Latest links on home page
webmaster33 4905 Jul 31, 2005, 12:20 PM
Thread Re: [webmaster33] Latest links on home page
BLOOD 4745 Jan 10, 2006, 2:46 AM
Thread Re: [BLOOD] Latest links on home page
webmaster33 4683 Jan 15, 2006, 8:58 AM
Post Re: [webmaster33] Latest links on home page
BLOOD 4700 Jan 15, 2006, 9:09 AM
Thread Re: [webmaster33] Latest links on home page
Payooo 4727 Jan 11, 2006, 9:14 PM
Post Re: [Payooo] Latest links on home page
webmaster33 4699 Jan 15, 2006, 8:57 AM