I have the next global
# 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
<%~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.
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.