Hi Zopers, I'm using the "in" tag vars to make an index on a large batch. The list I'm iteracting with is created by me from an external method, and is something of the format: [(1,2,3,abcd,5,6),(1,2,3,efgh,5,6),(1,2,3,4,ijkl,6)] My problem is that this code: <dtml-in mylist next size=2 start=qs> <dtml-in next-batches mapping> [<dtml-var batch-size>] </dtml-in> </dtml-in> Is giving me this results: [2]-[2]-[2]-[4] Good for the firsts [2] results, but strangely outputs a [4] size for the last batch. This also happens, in reverse order, for the code I use to "previous" batches, i.e, [4]-[2]-[2]-[2]. Am I missing something? Could be a problem with the fact the mylist is not a SQL result or something else,i.e, do I need do anything else to my list when I create it. My list as elements are not of the type 1 and a, theres is really there lots of text in each sequence-item but the list format is the one mentioned above. Thanks. JĂșlio ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
julio dinis wrote:
Hi Zopers,
I'm using the "in" tag vars to make an index on a large batch.
The list I'm iteracting with is created by me from an external method, and is something of the format:
[(1,2,3,abcd,5,6),(1,2,3,efgh,5,6),(1,2,3,4,ijkl,6)]
My problem is that this code:
<dtml-in mylist next size=2 start=qs> <dtml-in next-batches mapping> [<dtml-var batch-size>] </dtml-in> </dtml-in>
Is giving me this results:
[2]-[2]-[2]-[4]
Good for the firsts [2] results, but strangely outputs a [4] size for the last batch. This also happens, in reverse order, for the code I use to "previous" batches, i.e, [4]-[2]-[2]-[2].
Am I missing something?
There is an attribute called orphans (probably ;), that controls the number of orphaned items on last page. I think it defaults to >2 and so the last page of _only_ 2 items is appended to previous. There is similar parameter for overlap too. If you don't find it in docs then see the source ;-p ----------------- Hannu
participants (2)
-
Hannu Krosing -
julio dinis