Just because I like to advocate TAL:
<ul tal:condition="true: foo">
<li tal:repeat="blah foo">
<span tal:condition="repeat/first">First item?</span>
<span tal:condition="repeat/even">Even item?</span>
<span tal:condition="repeat/odd">Odd item?</span>
<span tal:content="blah/var">Replaced by Foo{'blah'}{'var'}</span>
<span tal:content="blah/method">Replaced by Foo{'blah'}->method()
</span>
</li>
</ul>
template:
renders in browser without code, as it would be seen
is valid markup
works in multiple languages
has multiple perl implementations
mini language is stupid and simple enough that designers don't have
enough control to screw things up
On Feb 16, 2006, at 1:33 PM, Randal L. Schwartz wrote:
"Tyler" == Tyler MacDonald <[EMAIL PROTECTED]> writes:
Tyler> Why am I forced to say
Tyler> [% FOREACH(blah) foo %]
Tyler> Instead of the
Tyler> [% for my $i (@foo) %]
Tyler> I've become happily used to?
Because the day will come when you want to replace
foo.a # get $foo->{a}
with
foo.a # invoke $foo->a