[Zope] dtml-var and the fmt attribute
Jim Sanford
jsanford@atinucleus.com
Sat, 6 Nov 1999 07:34:25 -0600
TRY: (untested)
<dtml-if "ord==2">
<dtml-var DP30 fmt="%3d" thousands_commas null='0'>
<dtml-else>
<dtml-call REQUEST.set('cell_fmt','%3.2f')>
</dtml-if>
Note - In my experience the null= requires a string argument. (At least
everytime I have tried to use a plain number Zope has choked on me.) This is
probably because zope is normally rendering output for a browser - ie. text.
Jim Sanford
"Loosing things? Your mind may be next."
----- Original Message -----
From: Chui Tey <teyc@bigfoot.com>
To: <zope@zope.org>
Sent: Saturday, November 06, 1999 6:10 AM
Subject: [Zope] dtml-var and the fmt attribute
> Trying to set the fmt of a dtml-var tag conditionally:
>
> <dtml-if "ord==2">
> <dtml-call REQUEST.set('cell_fmt','%3d')>
> <dtml-else>
> <dtml-call REQUEST.set('cell_fmt','%3.2f')>
> </dtml-if>
>
> <!--#var DP30 fmt="cell_fmt" thousands_commas null=0-->
>
> This barfs.... Any workarounds? TIA.
>
> Chui
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> No cross posts or HTML encoding!
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>