[Templates] match & search virtual methods.
Sherwood Botsford
sgbotsford at gmail.com
Fri Feb 29 04:14:21 GMT 2008
[% FOREACH section IN
[ 'Home', 'Trees', 'Advice', 'Our_Forests', 'Links' ]
%]
<td style="width: 15%;">
[% IF $template.name.search($section) %]
<b><i>$section</i></b>
[% ELSE %]
<a href="../$section/Welcome.html">$section</a></td>
[% END %]
Debug: section is $section template is $template.name
[% END %]
The IF clause never evaluates as true.
Running this, the out put of the debug section is:
Debug: section is Home template is Home/Welcome.tt2
Debug: section is Trees template is Home/Welcome.tt2
Debug: section is Advice template is Home/Welcome.tt2
Debug: section is Our_Forests template is Home/Welcome.tt2
Debug: section is Links template is Home/Welcome.tt2
Some wretched piece of syntax I'm missing, no doubt.
More information about the templates
mailing list