[Zope] obtaining properties from next / previous batch sequence-item?
Uwe Schuerkamp
uwe@schuerkamp.de
Mon, 13 May 2002 09:08:15 +0200
On Wed, May 08, 2002 at 09:04:25AM -0500, John Hunter wrote:
> >>>>> "Uwe" == Uwe Schuerkamp <uwe@schuerkamp.de> writes:
>
> Uwe> Hi folks, I am looking for an easy way to access properties
> Uwe> from previous or next objects in a <dtml-in>-generated batch
> Uwe> output.
>
> See the section 'Batch Processing With The In Tag' in the chapter
> 'Variables and Advanced DTML' in The Zope Book.
>
> http://www.zope.org/Documentation/ZopeBook/AdvDTML.stx
>
> The Appendix A of that book, in the DTML reference of the 'in'
> tag, gives you further information
>
> http://www.zope.org/Documentation/ZopeBook/AppendixA.stx
>
> John Hunter
Hi John,
thanks for your pointers. I know extract the title attribute by iterating
using something like this:
<dtml-if previous-sequence>
Previous:<a href="<dtml-var URL>
<dtml-var sequence-query>query_start=<dtml-var previous-sequence-start-number>">
<dtml-in expr="pictures.objectValues()" size=1 start=previous-sequence-end-number>
<dtml-var title></a>
</dtml-in>
</dtml-if>
<dtml-if next-sequence>
Next:<a href="<dtml-var URL>
<dtml-var sequence-query>query_start=<dtml-var next-sequence-start-number>">
<dtml-in expr="pictures.objectValues()" size=1 start=next-sequence-start-number>
<dtml-var title></a>
</dtml-in>
</dtml-if>
While this works it looks rather clumsy, and I guess there must be a
more elegant solution to this problem, no?
Thanks in advance,
Uwe
--
Uwe Schuerkamp Tel: +49 (0)5241 / 80 10 66, FAX: - / 6 23 38
Uwe.Schuerkamp@nionex.net Nionex GmbH, IWN5 (http://www.nionex.de/)
GnuPG KeyID: 5887047D Avenwedder Str. 55, 33311 Guetersloh
GnuPG Fingerprint: 2E 13 20 22 9A 3F 63 7F 67 6F E9 B1 A8 36 A4 61