[Zope-dev] dtml-in batching improved

Casey Duncan cduncan@kaivo.com
Thu, 31 May 2001 11:35:23 -0600


Ivo van der Wijk wrote:
> 
> On Wed, May 30, 2001 at 10:02:31PM +0100, Chris Withers wrote:
> > > When using batching in dtml-in, why is 'previous-sequence' only defined at
> > > the first iteration of the current batch? And why is 'next-sequence' only
> > > defined at the last iteration of the current batch?
> >
> > I know this problem ;-)
> >
> > I had it too, and stuck something in the collector about it. I did manage to
> > get the layout you're after without modifying Zope though (see the search
> > page on www.nipltd.com)
> >
> 
> I've done it myself as well using (as described in the posting) two
> dtml-in's (the second one purely for displaying the prev/next links).
> 
> Is your solution any different? (The only one I can think of is storing
> the info in your REQUEST object and using it later, but that's really
> ugly.)
> 

AFAIK that is what the next and previous options for dtml-in are for.
Usually
I just store the sequence (if it is a query) in a variable using a let
around
three (or more) dtml-ins. Two of which use the next or previous option
to create
the batching links.

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>