[Zope] Increment In PT?
Andrew Milton
akm at theinternet.com.au
Mon Jul 30 12:30:30 EDT 2007
+-------[ tonylabarbara at aol.com ]----------------------
| 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
akm at theinternet.com.au
More information about the Zope
mailing list