Can you give me an example of how to use the enumerate method in a repeat? I've googled this with no luck. Here's my tal:repeat clause: ????? <span tal:repeat="bitem_id bitem_ids;" tal:omit-tag=""> As fas as passing this to a python script, I'd rather not. That seems like too much trouble for something that IMHO should be easy, and if it's not, perhaps the gods of PT would like to do something about it.
TIA, Tony -----Original Message----- From: Andrew Milton <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; firstname.lastname@example.org Sent: Mon, 30 Jul 2007 12:30 pm Subject: Re: [Zope] Increment In PT? +-------[ [EMAIL PROTECTED] ]---------------------- | In order to interact with the paypal shopping cart system, they want me to | increment hidden fields, such as: | | <input type="hidden" tal:attributes="value item/name; name python:'item_name_' | + `x`"> | <input type="hidden" tal:attributes="value item/id; name python:'item_number_' | + `x`"> | | where "x" is a number from 1 on up, where "1" represents the first product in | the shopping cart, "2" represents the second product, etc. So...we have to do | it their way. Perhaps this is really bad ZPT, but we have to do it their way. | Can ZPT handle this, or not? 1) Why not use the "enumerate" method in your repeat? 2) Why not pass the items to a python script that builds the structure you need and returns it? -- Andrew Milton [EMAIL PROTECTED] ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )