Hi
I have the following global
that I call from the detailed template with
<%set Random_CatID = $CategoryID%>
<%random_links%>
<%loop Random_Loop%>
<li><%Title%></li>
<%endloop%>
It was working fine when I used LSQL 2.1.2 but it is not working anymore since I have upgraded to LSQL 2.2.0
I seems that $CategoryID is not recognised in the detailed template, so the value is not passed to the global...
Any Idea ????
txs FMP
I have the following global
sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = $tags->{Random_CatID};
my $limit = $tags->{Random_Limit} || 5;
my (@output, $sth); $link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
if ($cat_id) {
$sth = $link_db->select ( { CategoryID => $cat_id, IsValidated => 'Yes'});
}
else {
$sth = $link_db->select(IsValidated => 'Yes');
}
while (my $hash = $sth->fetchrow_hashref) {
push @output, $hash;
}
return { Random_Loop => \@output }
}
that I call from the detailed template with
<%set Random_CatID = $CategoryID%>
<%random_links%>
<%loop Random_Loop%>
<li><%Title%></li>
<%endloop%>
It was working fine when I used LSQL 2.1.2 but it is not working anymore since I have upgraded to LSQL 2.2.0
I seems that $CategoryID is not recognised in the detailed template, so the value is not passed to the global...
Any Idea ????
txs FMP