Re: Numbering across a batch

"Martin Aspeli" <[email protected]> Thu, 20 Jan 2005 01:07:23 -0000
Newsgroups gmane.comp.web.zope.plone.design
Message-ID <opskvmqlmofyd109@carolina>
On Wed, 19 Jan 2005 13:10:54 -0500, Steve Hein  
<[email protected]> wrote:

> I'm using batch to display a long list. I want to number all the items  
> in the list consequtively from first to last. Is there a variable in  
> batch that names every item in the list? Right now, what's happening is  
> that, using a list length of 10, the first batch is numbered from 1 to  
> 10 and the second batch is numbered the same way, when what I want is  
> for it to be numbered from 11 to 20.

If you're using the standard batching conventions, the request variable  
b_start tells you the number the batch starts at. If you are looping over  
a variable, just add the value of b_start to it (and default to 0 if  
b_start is not defined).

Martin


-- 
"Life is both a major and a minor key" -- Travis, Side



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl