[Templates] IF a ELSE b END always produces b
[prev]
[thread]
[next]
[Date index for 2004/07/16]
I can't seem to get an IF ELSE END branch to do the right thing. Following
the lead in the O'Reilly book, I have a site defined by:
layout with:
[% WRAPPER html;
WRAPPER layout;
content;
END;
END
%]
lib/layout has:
<table>
<tr>
<td>[% IF ins %][% ins %][% ELSE %][% PROCESS leftcol %][% END %]</td>
<td>[% content %]</td>
<td><!-- rightcol --></td>
</tr>
</table>
The template has a BLOCK and some content:
[% BLOCK ins %]Left column content[% END %]
Main content ......
The problem is that the IF branch always processes 'leftcol', never 'ins'.
I've tried [% PROCESS ins %] as well but no luck.
Garry Heaton
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] IF a ELSE b END always produces b
Garry Heaton 00:26 on 16 Jul 2004
|