[Zope] Q: Setting/Creating variables

James A. Hillyerd jamesh@altavista.net
Tue, 9 Mar 1999 17:09:12 -0800 (PST)


I have been playing around with Zope/ZPublisher/DocumentTemplate and have
been extremely pleased with the ease of development, as well as the power
of the Python language.

Sometimes I have found myself wanting to save the results of an expression
in my DTML code, for use later in the same page (or even an embedded DTML
object).  The only thing I have used that is similar to DTML is
ColdFusion, which has a CFSET tag, ie: <cfset myvar = "test"> or
<cfset total = subtotal * tax>

In reading the docs, it looked like I might be able to do something along
the lines of <!--#call "REQUEST.set('var', 'value')--> but this didn't
seem to work, and it's not very elegant either.

Am I missing something? None of the howtos or tutorials seem to cover
this.  A <!--#set newvar=oldvar--> / <!--#set var="expr"--> would be
really spiffy. =)

Please make sure you CC me if you respond to this message, as I had to
unsubscribe due to the overwhelming amount of traffic.

Thanks!

-james

[]  James A. Hillyerd <jamesh@altavista.net> Java Developer
[]  HyperGlyphics:  http://www.hyperglyphics.com/
[]  GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01):
[]   C86F B073 92DF 1E24 EF0B  0118 6061 0FEC 9F95 6CDE