[ZPT] DTML 2 ZPT question

Peter Bengtsson mail@peterbe.com
Mon, 10 Sep 2001 17:38:56 +0200


> > <td tal:content="here/title | default">&nbsp;</td>
> > becomes <td>&nbsp;</td> since 'default' is '&nbsp;'
>
> That's only true if title doesn't actually exist ;-)
>
> And since title always exists in Zope but is often blank, '' is what's
usually
> substituted, unless I'm missing something very obvious :-(

Oops! I was too quick.
NULL="&nbsp;"

<td tal:attributes="untested 'true'"

tal:content="python:test(here.title=='',here.title,default)">&nbsp;</td>

Along the line of this (thanks Evan!)
http://www.zope.org/Members/peterbe/DTML2ZPT/examples/example6/view







> cheers,
>
> Chris
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt