Garito wrote:
Hi! Please consider this TALES expression:<div class="DataPrevista" tal:content='here/getDataInici | string: nosta' />If I try this other: <div tal:content='string:${here/getDataInici}' /> the result is <div>None</div>Then the first one will render the alternate expression isn't it? Then with it renders <div class="DataPrevista" /> ?
Сто? ;-) You should check the tales documentation. the pipe symbol | means a logical "or", in effect if the left expression resolves to "non existent", None, empty object,... (generally python False) the right part of it is evaluated. In the special case it probably is nicer to use:<div class="DataPrevista" tal:content="here/getDataInici | default">nosta</div> instead so the fallback value is part
of the template (TAL is meant to be design by example) I would also recommend not mixing " and ' for attributes and maybe in the long run sticking to english language names for your objects makes it easier to ask on mailinglists. Regards Tino
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )