Try this way:<br><br>&lt;tal:loop repeat=&quot;item bitems&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; tal:attributes=&quot;value item/name; name string:item_name_${repeat/item/number}&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; tal:attributes=&quot;value item/id; name string:item_number_${repeat/item/number}&quot;&gt;
<br>&lt;/tal:loop&gt;<br><br>Zenrique.<br><br><div><span class="gmail_quote">2007/7/30, Peter Bengtsson &lt;<a href="mailto:peter@fry-it.com">peter@fry-it.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You should now have all the parts.<br>Instead of iterating over python:range(1000) do it on bitem_ids instead.<br><br>You don&#39;t have to use a &lt;br /&gt; tag. You can use<br>&lt;input tal:attributes=&quot;value iter/number&quot; /&gt;
<br>if you want.<br>You increment it by calling tal:iter/next whichever way you do it.<br><br><a href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</a> wrote:<br>&gt; I would think this should be pretty easy in the PT itself, given what
<br>&gt; you&#39;ve shared so far. But I&#39;m still not quite there. Here&#39;s what I&#39;ve got:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span tal:repeat=&quot;bitem_id bitem_ids&quot; tal:omit-tag=&quot;&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div tal:define=&quot;iter
<br>&gt; python:modules[&#39;ZTUtils&#39;].Iterator(range(1000))&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;br tal:define=&quot;x iter/next&quot; tal:replace=&quot;iter/number&quot; /&gt;<br>&gt;<br>&gt; Now, I don&#39;t really want that &lt;br /&gt; tag there, because it&#39;s printing a
<br>&gt; number to screen that I don&#39;t want there. However, it only prints the<br>&gt; number &quot;1&quot; twice, once for each product, when it should print 1 then 2,<br>&gt; I would think. (I presume I should just take the tal:replace out and
<br>&gt; leave the definition, but it&#39;s still not incrementing!) Later in the<br>&gt; script I have this:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; tal:attributes=&quot;value item/name;<br>&gt; name python:&#39;item_name_&#39; + `x`&quot;&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; tal:attributes=&quot;value item/id; name<br>&gt; python:&#39;item_number_&#39; + `x`&quot;&gt;<br>&gt;<br>&gt; and other similar lines. What I&#39;m trying to effectuate is that the &quot;x&quot;
<br>&gt; gets replaced with an incremented number. Can you help just a little more?<br>&gt; TIA,<br>&gt; Tony<br>&gt;<br>&gt; -----Original Message-----<br>&gt; From: Peter Bengtsson &lt;<a href="mailto:peter@fry-it.com">
peter@fry-it.com</a>&gt;<br>&gt; To: <a href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</a><br>&gt; Cc: <a href="mailto:zope@zope.org">zope@zope.org</a><br>&gt; Sent: Mon, 30 Jul 2007 1:32 pm<br>&gt; Subject: Re: [Zope] Increment In PT?
<br>&gt;<br>&gt; You can use the ZTUtils Iterator()<br>&gt;<br>&gt; &lt;div tal:define=&quot;iter python:modules[&#39;ZTUtils&#39;].Iterator(range(1000))&quot;&gt;<br>&gt;&nbsp;&nbsp; &lt;br tal:define=&quot;dummy iter/next&quot; tal:replace=&quot;iter/number&quot; /&gt;
<br>&gt;&nbsp;&nbsp; &lt;br tal:define=&quot;dummy iter/next&quot; tal:replace=&quot;iter/number&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;br tal:define=&quot;dummy iter/next&quot; tal:replace=&quot;iter/number&quot; /&gt;<br>&gt; &lt;/div&gt;<br>
&gt;<br>&gt; Which might give you some freedom such as iter/Roman or iter/odd<br>&gt; The above is practically the same as:<br>&gt;<br>&gt;&nbsp;&nbsp; &lt;br tal:repeat=&quot;i python:range(3)&quot; tal:replace=&quot;i&quot; /&gt;
<br>&gt;<br>&gt; Generally, if you can, use a Python Script or something. The Iterator<br>&gt; is/was used in Plone templates to increment the tab index.<br>&gt;<br>&gt; <a href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com
</a> &lt;mailto:<a href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</a>&gt; wrote:<br>&gt;&nbsp;&nbsp;&gt; Hi;<br>&gt;&nbsp;&nbsp;&gt; Iīm trying to increment a variable in a page template. Hereīs the &gt;<br>&gt; general idea in my code:
<br>&gt;&nbsp;&nbsp;&gt; &gt; &lt;div metal:define-macro=&quot;main&quot; tal:define=&quot;x python:0&quot;&gt;<br>&gt;&nbsp;&nbsp;&gt; &gt; &lt;tal:block tal:define=&quot;x python:x + 1&quot;&gt;<br>&gt;&nbsp;&nbsp;&gt; &lt;td&gt;<br>&gt;&nbsp;&nbsp;&gt; &lt;input type=&quot;hidden&quot; tal:attributes=&quot;value item/name; name &gt;
<br>&gt; python:&#39;item_name_&#39; + `x`&quot;&gt;<br>&gt;&nbsp;&nbsp;&gt; &gt; &gt; Now, all of that works...once. That is, it increments from 0 to<br>&gt; 1, but &gt; not from 1 to 2! Each time I pass through the td element, I<br>
&gt; need it to &gt; increment. I tried putting the tal definition in the td,<br>&gt; but then it &gt; didnīt even increment once! What do?<br>&gt;&nbsp;&nbsp;&gt; TIA,<br>&gt;&nbsp;&nbsp;&gt; Tony<br>&gt;&nbsp;&nbsp;&gt; ------------------------------------------------------------------------
<br>&gt;&nbsp;&nbsp;&gt; AOL now offers free email to everyone. Find out more about what&#39;s<br>&gt; free &gt; from AOL at *AOL.com*<br>&gt; &lt;<a href="http://www.aol.com?ncid=AOLAOF00020000000437">http://www.aol.com?ncid=AOLAOF00020000000437
</a><br>&gt; &lt;<a href="http://www.aol.com/?ncid=AOLAOF00020000000437">http://www.aol.com/?ncid=AOLAOF00020000000437</a>&gt;&gt;.<br>&gt;&nbsp;&nbsp;&gt; &gt; &gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt;&nbsp;&nbsp;&gt; &gt; _______________________________________________<br>&gt;&nbsp;&nbsp;&gt; Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a> &lt;mailto:<a href="mailto:Zope@zope.org">Zope@zope.org</a>&gt;<br>&gt;&nbsp;&nbsp;&gt; 
<a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>&gt;&nbsp;&nbsp;&gt; ** No cross posts or HTML encoding! **<br>&gt;&nbsp;&nbsp;&gt; (Related lists - &gt; <a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt;&nbsp;&nbsp;&gt; <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>&gt;<br>&gt; -- Peter Bengtsson,<br>&gt; work 
<a href="http://www.fry-it.com">www.fry-it.com</a> &lt;<a href="http://www.fry-it.com/">http://www.fry-it.com/</a>&gt;<br>&gt; home <a href="http://www.peterbe.com">www.peterbe.com</a> &lt;<a href="http://www.peterbe.com/">
http://www.peterbe.com/</a>&gt;<br>&gt; hobby <a href="http://www.issuetrackerproduct.com">www.issuetrackerproduct.com</a> &lt;<a href="http://www.issuetrackerproduct.com/">http://www.issuetrackerproduct.com/</a>&gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt; AOL now offers free email to everyone. Find out more about what&#39;s free<br>&gt; from AOL at *AOL.com* &lt;<a href="http://www.aol.com?ncid=AOLAOF00020000000437">http://www.aol.com?ncid=AOLAOF00020000000437</a>
&gt;.<br><br>--<br>Peter Bengtsson,<br>work <a href="http://www.fry-it.com">www.fry-it.com</a><br>home <a href="http://www.peterbe.com">www.peterbe.com</a><br>hobby <a href="http://www.issuetrackerproduct.com">www.issuetrackerproduct.com
</a><br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope
</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">
http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br>