[Zope] dynamic format strings (was: using let and fmt)

Matt Gregory matthew.gregory@skyleach.com
Thu, 21 Feb 2002 15:21:33 -0500


Does anyone know how to dynamically format strings in DTML?  I never got (or
never saw) an answer to this question.  I basically want to pass the fmt
attribute as a string varable dynamically to a method.  The method formats
some 50 strings so I really don't want 50 dtml-if statements (not to mention
ifelse and else statements).

Thanks,
    -Matt
----- Original Message -----
From: "Matt Gregory" <matthew.gregory@skyleach.com>
To: "Zope" <zope@zope.org>
Sent: Wednesday, February 20, 2002 3:16 PM
Subject: Re: [Zope] using let and fmt


> BTW/FYI it throws an ErrorType: TypeError "not all arguments converted"
>
> ----- Original Message -----
> From: "Matt Gregory" <matthew.gregory@skyleach.com>
> To: "Zope" <zope@zope.org>
> Sent: Wednesday, February 20, 2002 3:11 PM
> Subject: [Zope] using let and fmt
>
>
> > Does anyone know if it's possible to do the following and if so possibly
> > tell me why it might throw errors?
> >
> > <dtml-let mystring="'blah'" format="'%s'">
> >   <dtml-var mystring fmt=format>
> > </dtml-let>
> >
> >
> > _______________________________________________
> > 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 )
> >
>
>
> _______________________________________________
> 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 )
>