Right, but <%if category_id%> is going to be a null if statement if $category_id is not passed into links.html.
I tested this earlier by saying <%if category_id%><li><%else%>test<%endif%> and it printed test, of course, because $category_id is not declared.
<%link_results%> is not in your link.html though, so <%if link_results%> is an anomaly to links.html.
Anyway, it doesn't matter, I just solved my problem by placing this in links.html
<!--li-->
and I wrote this Andy-style global
'replace_li' => 'sub {
my $in = $_[0];
$in =~ s,<!--li-->,<li>,g;
return $in;
}',
<%replace_li($links)%>
So anytime I want the li to display, I can say <%replace_li($link_results)%> instead of <%link_results%> or whatever.
Thanks everyone anyway,
- Jonathan
I tested this earlier by saying <%if category_id%><li><%else%>test<%endif%> and it printed test, of course, because $category_id is not declared.
<%link_results%> is not in your link.html though, so <%if link_results%> is an anomaly to links.html.
Anyway, it doesn't matter, I just solved my problem by placing this in links.html
Code:
<!--li-->
and I wrote this Andy-style global
Code:
'replace_li' => 'sub {
my $in = $_[0];
$in =~ s,<!--li-->,<li>,g;
return $in;
}',
<%replace_li($links)%>
So anytime I want the li to display, I can say <%replace_li($link_results)%> instead of <%link_results%> or whatever.
Thanks everyone anyway,
- Jonathan