[Zope] Batch processing... SOLVED
Curtis Maloney
curtis@umd.com.au
Fri, 3 Mar 2000 18:22:13 +1100
Again, greetings...
So I kept looking at what I had, and some things just did NOT look right.
So I fiddled. I wrangled. I bashed it with various bits of office equipment.
And I got it to work!
here is a cutdown of what i used:
<dtml-in "somQueryHere" size=5 start=qs>
<dtml-if sequence-start>
<dtml-if previous-sequence>
<tr><td colspan="2"><a href="past_orders?qs=<dtml-var previous-sequence-start-index>">
Previous <dtml-var previous-sequence-size> orders.</a></td>
</tr>
</dtml-if>
</dtml-if>
<tr><td>STUFF</td>
<td>FROM</td>
<td>ITERATED</td>
<td>QUERY</td>
<td>HERE</td>
</tr>
<dtml-if sequence-end>
<dtml-if next-sequence>
<tr><td colspan="5"><a href="past_orders?qs=<dtml-var next-sequence-start-index>">
Next <dtml-var next-sequence-size> orders.</a></td>
</tr>
</dtml-if>
</dtml-if>
</dtml-in>
it's much simpler than the example in the DTML book (IMHO), and it would be
faster in making only ONE call to whatever query it is you're using, not 3.
I'm not sure who is in charge of the DTML reference manual, but if i get a
moment i will be forwarding this code snippet on to them.
--
Have a better one,
Curtis.
<dtml-var standard_work_disclaimer>