Gossamer Forum
Home : Products : Gossamer Links : Discussions :

New in category

Quote Reply
New in category
Hello,



I am using this global:

sub {
# Displays New links in category.
my ($output,$sth,$link);
my $id = shift;
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY ADD_DATE DESC', 'LIMIT 1');
my $sth = $db->select ( { isNew => 'Yes'}, { 'CatLinks.CategoryID' => $id}, { isValidated => 'Yes'} );
my $premium;
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('newlink', $link);
}
return $output;
}

with the following tag: <%new_by_cat$ID%>

How come the template "newlink" will not return things that are displayed in the record's detail page, even if they are requested in the "newlink" template?

I have the following tag <%Image_01_path%> that works on the detailed template but not the newlink template, does anyone know why? Or a way to display it?



Thank you for your time.

Last edited by:

nt6: Aug 21, 2002, 3:13 AM
Quote Reply
Re: [nt6] New in category In reply to
Probably because the variables that you are using exist in one template but not in another. use <%GT::Template::dump%> to see which vars you can use.
Quote Reply
Re: [giovanni] New in category In reply to
That was the first thing I did and the name or value of <%Image_01%> did not appear. I get a broken image in the parsed template, so yes I do have a tag calling it, it's not working.

Do you know what needs to be added for it to appear? How should this global be edited if that is what it takes?