[Zope] How do reset a dtml-var

Meilicke, Scott scott.meilicke@intp.com
Mon, 3 Jun 2002 10:10:58 -0700


variables set by dtml-let are only in the namespace in between the dtml-let
tags.  When you close the tag, the variables are removed.  If you can't use
dtml-let tags, you can push the variable into REQUEST with:

(not tested)

<dtml-call "REQUEST.set('revision','%')">

-Scott

-----Original Message-----
From: McDonnell, Larry [mailto:lmcdonnell@protonenergy.com]
Sent: Monday, June 03, 2002 9:57 AM
To: 'Zope@Zope. Org' (E-mail)
Subject: [Zope] How do reset a dtml-var


Hi,

I am trying to check to see if the dtml-var revision is set to a null and if
it is I want to set it to "%" as a sql wildcard. This is my test.

<dtml-if expr="revision==''">
<p><dtml-var revision>test if1</p>
<dtml-let revision="'%'">
<p><dtml-var revision>test if2</p>
</dtml-let>
<p><dtml-var revision>test if3</p>
</dtml-if>

Here are my results.
test if1
%test if2
test if3

How come the variable is not set after I leave dtml-let statement? Thanks.

Larry McDonnell

Proton Energy Systems
50 Inwood Rd.
Rocky Hill, CT 06067
(860) 571-6533 ext. 531
Email:lmcdonnell@protonenergy.com
www.protonenergy.com



_______________________________________________
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 )
The information contained in this email message may be privileged and is
confidential information intended only for the use of the recipient or any
employee or agent responsible for delivering it to the intended recipient.
Any unauthorized use, distribution or copying of this information is
strictly prohibited and may be unlawful.  If you have received this
communication in error, please notify the sender immediately and destroy the
original message and all attachments from your electronic files.