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