[Zope] increment variable

Terrel Shumway tshumway@epicor.com
Wed, 29 Sep 1999 16:54:13 -0700


This will append a '1' to PresetCookie (a string). I don't know yet how to
convert the string to a number.

<dtml-if PresetCookie>
 <dtml-call "RESPONSE.setCookie('PresetCookie', PresetCookie +'1')">
 <dtml-var PresetCookie>
<dtml-else>
 <dtml-call "RESPONSE.setCookie('PresetCookie', 1)">
</dtml-if>
<a href="cookietest">again</a>


-----Original Message-----
From: Mike Mikkelsen [mailto:mikk@microbsys.com]
Sent: Wednesday, September 29, 1999 2:29 PM
To: zope@zope.org
Subject: [Zope] increment variable


Hello again,

I think I've seen this subject on the list before but I'm having a hard
time wording it right so as to find it in the archives.

Is there a way, without PythonMethod & External Python Methods, to
increment a variable (possibly a cookie value)?  Something like this:

<dtml-var "_['PresetCookie']=_['PresetCookie']+1">

or

<dtml-var "_['PresetCookie']=_['PresetCookie']+_['product_cost']">