[Zope] Assigning strings using DTML-LET
Marcus Collins
mcollins@sunesi.com
Fri, 31 Mar 2000 12:51:16 +0200
Hi
Try <dtml-let criteria="'1=1'">
The bit inside the double quotes is evaluated as a python expression, and
thus returns the string you want.
See http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.10.html
hth,
-- Marcus
> -----Original Message-----
> From: Jason Wong [mailto:jwong@digitalview.com.hk]
> Sent: 31 March 2000 12:35
> To: Send Zope Mailing List
> Subject: [Zope] Assigning strings using DTML-LET
>
>
>
> I'm trying to assign the string:
>
> 1=1
>
> to the variable criteria using this construct:
>
> <dtml-let criteria='1=1'>
>
> but I can't because Zope complains:
>
> invalid parameter: "=1'", for tag <dtml-let criteria='1=1'>,
> on line 5 of
> Create_List
>
> Some playing around reveals that it doesn't like spaces and
> the equals sign
> (=) in the string.
>
> Am I correct in thinking that something delimited by single
> quotes (eg.
> 'this is a string') is a string? If so why can't I (or how
> can I) include
> spaces and the equal sign inside the string.
>
>
> thanks
> -
> Jason Wong
>
>
> _______________________________________________
> 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 )
>