[ZPT] TALES Feature Survey

Guido van Rossum guido@digicool.com
Fri, 18 May 2001 10:10:30 -0500


> - Please consider also adding a standard 'defaultcontent'-variable for the
>  text-content of the element, not just the attributes..
> 
> ehm.. i see how this could be quite horrid for things like the 'body'
> element, but it could be quite useful in some situations...
> - but you could perhaps limit it to text-only-nodes ??
> 
> <h2 tal:content="defaultcontent | template/title">if anything is here,
> it will display instead of the template's title</h2>

Hm, I don't like this one.  It's hard for the parser to make that
available (though I'm sure I could find a way), as you say there's the
question of what to if there's markup occurring in the text (though I
guess we could limit it to "only of there are no TAL/METAL tags in
it"), and last but not least, I don't think your example makes much
sense.  It would mean that the outcome of the choice could only be
changed by editing the template.  That seems backward.

--Guido van Rossum (home page: http://www.python.org/~guido/)