[Zope] HOw Do I Modify A Defined Variable In TAL?

Paul Winkler pw_lists at slinkp.com
Sat Aug 23 03:17:05 EDT 2003


On Thu, Aug 21, 2003 at 03:16:04PM -0700, Jonathan Mark wrote:
> Using TAL and ZPT, I would like to define a global
> variable myVar, and then later on in the page 
> 
> add 1 to myVar, e.g.  myVar = myVar + 1.
> 
> How can I modify a variable in TAL? I know how to
> modify a tag using REPLACE, ATTRIBUTES etc., but I
> want to modify a variable that I have previously defined.

for math you can use a tales python expression...

<tal:define="foo python:foo + 1">

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's FORGETFUL RADIOCACTIVE MAJOR!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list