You are not logged in Log in Join
You are here: Home » Members » ivo » Ivo's patches » dtml-in patch that introduces new batch- variables

Log in
Name

Password

 
 
*** Zope-2.3.2-orig/lib/python/DocumentTemplate/DT_In.py	Fri Apr 13 21:30:38 2001
--- Zope-2.3.2-src/lib/python/DocumentTemplate/DT_In.py	Tue May 29 20:23:24 2001
***************
*** 583,589 ****
                  for index in range(first,end):
                      # preset
                      kw['previous-sequence']= 0
!                     kw['next-sequence']= 0 # now more often defined then previously
                      #
                      if index==first or index==last:
                          # provide batching information
--- 583,609 ----
                  for index in range(first,end):
                      # preset
                      kw['previous-sequence']= 0
!                     kw['next-sequence']= 0 # now more often defined than previously
!                     # provide batching information
!                     if first > 0:
!                         pstart,pend,psize=opt(0,first+overlap,
!                                               sz,orphan,sequence)
!                         kw['batch-previous-sequence']=1
!                         kw['batch-previous-sequence-start-index']=pstart-1
!                         kw['batch-previous-sequence-end-index']=pend-1
!                         kw['batch-previous-sequence-size']=pend+1-pstart
!                     try:
!                         # The following line is a sneaky way to
!                         # test whether there are more items,
!                         # without actually computing a length:
!                         sequence[end]
!                         pstart,pend,psize=opt(end+1-overlap,0,
!                                               sz,orphan,sequence)
!                         kw['batch-next-sequence']=1
!                         kw['batch-next-sequence-start-index']=pstart-1
!                         kw['batch-next-sequence-end-index']=pend-1
!                         kw['batch-next-sequence-size']=pend+1-pstart
!                     except: pass
                      #
                      if index==first or index==last:
                          # provide batching informatio