[ZPT] Re: TAL's lack of an else...
Jean-Michel Hiver
jhiver at mkdoc.com
Fri Aug 1 14:30:53 EDT 2003
> Absolutely but I think that not having "else" is a serious deficiency. If you
> can point me to another vaguely respectable template language that doesn't
> have "else" I'll buy you a pint!
Well, this page lists a bunch of 'vaguely respectable' templating
solutions:
http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html
One of them is HTML_Tree, which parses HTML into a DOM, and then
programmatically modifies the contents of nodes.
As you can see it's got no 'else'. Phear. I've won a pint. Yey!
I'll get the salt and vinegar crisps :)
To go back to your problem how about having something like (throwing
ideas in):
<tag tal:condition="true:foo" id="foo_condition">
<!--
automagically set a global variable
called #foo_condition to TRUE
-->
...
</tag>
<tag tal:condition="false: #foo_condition">
...
</tag>
Am I making any sense?
--
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/
More information about the ZPT
mailing list