[Zope] Increment In PT?

tonylabarbara at aol.com tonylabarbara at aol.com
Mon Jul 30 10:16:35 EDT 2007


Hi;
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">

<td>
<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?
TIA,
Tony

________________________________________________________________________
AOL now offers free email to everyone.  Find out more about what's free from AOL at AOL.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070730/fa2f36f5/attachment.htm


More information about the Zope mailing list