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

<%if FatherID eq not working anymore?!

Quote Reply
<%if FatherID eq not working anymore?!
hi every one.
I need some help with my global.
I working well in the 2.x versions, but in 3. are now.
there is a listing:

global:
Random_Link2

sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = $tags->{Random_CatID};
my $limit = $tags->{Random_Limit} || 15;
my (@output, $sth); $link_db->select_options ('ORDER BY Rating DESC', "LIMIT $limit");
if ($cat_id) {
$sth = $link_db->select ( { CategoryID => $cat_id });
}
else {
$sth = $link_db->select;
}
while (my $hash = $sth->fetchrow_hashref)
{ push @output, $hash;
}
return { Random_Loop => \@output } }


template code:
<%if FatherID eq '175'%>
<%set Random_CatID = 175%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a>&nbsp;<br>
<%endloop%>
<%elseif FatherID eq '1'%>
<%set Random_CatID = 1%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a>&nbsp;<br>
<%endloop%><%endif%>

as I mentioned, its worked well in the past versions of Links, but wount to work in the 3.

please help to fix it.

Last edited by:

hmc: Jun 2, 2005, 11:35 PM
Subject Author Views Date
Thread <%if FatherID eq not working anymore?! hmc 1351 Jun 2, 2005, 11:33 PM
Post Re: [hmc] <%if FatherID eq not working anymore?!
pugdog 1240 Jun 6, 2005, 5:34 PM