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

latest added reviews with link tags

Quote Reply
latest added reviews with link tags
I have the next global
Code:
sub {
# Displays the newest links on the home page.
my ($output, $sth, $review);
my $search_db = $DB->table('Reviews');
$search_db->select_options ('ORDER BY Review_Date DESC');
$sth = $search_db->query_sth ( { Review_Validated => 'Yes' });
my $i=1;
review: while ($review = $sth->fetchrow_hashref) {
my $desc = $review->{Review_Contents};
unless (length $desc <= 30) {my $short = substr ($desc, 0, 30); $short =~ s/\s\S+?$//; $short .= " ..."; $review->{Review_Contents} = $short;}
$output .= Links::SiteHTML::display ('global_topreviews', $review);
last review if ($i>=3);
$i++;
}
return $output;
}

which show me latest reviews.
I need also to include link tags there(title,description,etc.) but it`s not working if I add

Code:
<%~if show_link_info%>
<%~set ID = $LinkID%>
<%~Links::Utils::load_link_info%>
<%include link.html%>
<%~set ID = ''%>
<%~endif%>

in global_topreviews.html template

please help, how to make link tags run with this global.

Last edited by:

hmc: Nov 17, 2005, 10:04 PM
Quote Reply
Re: [hmc] latest added reviews with link tags In reply to
Try changing

<%~set ID = $LinkID%>

to

<%~set ID = $Review_LinkID%>
Quote Reply
Re: [hmc] latest added reviews with link tags In reply to
 
hi,

In Reply To:
<%~if show_link_info%>
<%~set ID = $LinkID%>
<%~Links::Utils::load_link_info%>
<%include link.html%>
<%~set ID = ''%>
<%~endif%>
[/quote]
functioned unfortunately not. Also manual setting of the ID does not function.

How does one know the problem suns to still solve?

Thanks

--
Peter

my Homepages : http://www.hunde-im-netz.de http://www.awanii.de