[Zope3-dev] Re: tal:replace="default" question

Evan Simpson evan at 4-am.com
Fri May 13 14:50:09 EDT 2005


Paul Winkler wrote:
> On Fri, May 13, 2005 at 05:39:56PM +0400, Dmitry Vasiliev wrote:
> 
>>'<span tal:content="default">42</span>'  =>  '<span>42</span>'
>>'<span tal:replace="default">42</span>'  =>  '42'
> 
> +1. IMHO the current behavior is wrong. "replace" should always replace
> the element, no exceptions.
> (Zope 2 has the same bug, I just checked.)

You can certainly disagree with this behavior, but it is not a bug.

See http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx
for example, which states that default is "A special value that doesn't
change anything when used in tal:replace, tal:content, or
tal:attributes. It leaves the template text in place."

Cheers,

Evan @ 4-am



More information about the Zope3-dev mailing list