obtaining properties from next / previous batch sequence-item?
Hi folks, I am looking for an easy way to access properties from previous or next objects in a <dtml-in>-generated batch output. Background: I would like to put "navigation links" on the bottom of the page, containing the phrase "Next: " and then the property of the next object in question named "caption". Same goes for "previous" and so on. Thanks very much in advance for your time, 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
"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
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
participants (2)
-
John Hunter -
Uwe Schuerkamp