[ZPT] Extending tal:condition, making metal:define

Evan Simpson evan@digicool.com
Fri, 6 Apr 2001 11:03:36 -0500


From: "Guido van Rossum" <guido@digicool.com>
> The general problem in this thread seems to be that TAL (like DTML?)
> doesn't have an "else" construct.  Could we add one, e.g. as follows:

The reason for that (beyond the awkwardness of trying to spell alternate
branches in attribute language) is that anything more complex than
on/off or replace/don't behavior violates the WYSIWYG principle of ZPT.
In other words, when you are viewing template source, it is easy to
visualize the effect of omitting an element, and trivially easy to see
the effect of leaving an element unchanged.  On the other hand, placing
multiple versions of an element side-by-side is likely to distort the
page.

This is the problem that we intended to address with "modes", and may be
able to implement with switchable macro references.

Cheers,

Evan @ digicool