I´m trying to increment a variable in a page template. Here´s the general idea 
in my code:

<div metal:define-macro="main" tal:define="x python:0">


<tal:block tal:define="x python:x + 1">

<input type="hidden" tal:attributes="value item/name; name python:'item_name_' 
+ `x`">

Now, all of that works...once. That is, it increments from 0 to 1, but not from 
1 to 2! Each time I pass through the td element, I need it to increment. I 
tried putting the tal definition in the td, but then it didn´t even increment 
once! What do?

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to