[Zope] R: [Zope] Assigning strings using DTML-LET

Marcel Preda marcel@punto.it
Fri, 31 Mar 2000 13:16:45 +0200


Jason Wong wrote:

>
> 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


DTML-LET sintax:<dtml-let variable="exp"> </dtml-let>

So use:
<dtml-let criteria="'1=1'">
not
<dtml-let criteria='1=1'>

Or te best way ( I've  found it yesterday) :

<dtml-let valueVar="'var has value: %s'  % (var)">


All the best!

Marcel