dtml-in: number of items in current batch
I can't seem to figure out what sequence- variable to use to get the number of items in the current batch. sequence-step-size gives me the size of the batch as I requested (ex, for <dtml-in ... size="3"> returns 3), but if there are actually only 2 more items to go, what can I use to get the number 2? Feelin' like a newbie...Thanks! _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
This is what I've been using in our employee directory listing. Sure looks unfamiliar, tho. Don't know where I found it. Found <dtml-var "_['sequence-step-end-index']+1"> items. OK. Now I find it in the ZQR. It's the end index of the current batch. Look in the ZQR for more variables. -- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Tuesday, April 24, 2001 13:14 To: zope@zope.org Subject: [Zope] dtml-in: number of items in current batch
I can't seem to figure out what sequence- variable to use to get the number of items in the current batch. sequence-step-size gives me the size of the batch as I requested (ex, for <dtml-in ... size="3"> returns 3), but if there are actually only 2 more items to go, what can I use to get the number 2?
Feelin' like a newbie...Thanks! _______________________
Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
This gives me the index of the last item of the batch, but the index is relative to the entire sequence, not just the batch. I need just the number of items in the current batch. The ones listed in the ZQR / Zope Book don't help. Any other ideas? _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Loren Stafford [mailto:lstafford@morphics.com] Sent: Tuesday, April 24, 2001 4:43 PM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This is what I've been using in our employee directory listing. Sure looks unfamiliar, tho. Don't know where I found it.
Found <dtml-var "_['sequence-step-end-index']+1"> items.
OK. Now I find it in the ZQR. It's the end index of the current batch. Look in the ZQR for more variables.
I don't see any way to do it other than subtract from sequence-step-end-index the product of the batch size and the number of prior batches. -- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Tuesday, April 24, 2001 13:51 To: Loren Stafford; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This gives me the index of the last item of the batch, but the index is relative to the entire sequence, not just the batch. I need just the number of items in the current batch. The ones listed in the ZQR / Zope Book don't help. Any other ideas? _______________________
Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Loren Stafford [mailto:lstafford@morphics.com] Sent: Tuesday, April 24, 2001 4:43 PM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This is what I've been using in our employee directory listing. Sure looks unfamiliar, tho. Don't know where I found it.
Found <dtml-var "_['sequence-step-end-index']+1"> items.
OK. Now I find it in the ZQR. It's the end index of the current batch. Look in the ZQR for more variables.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I guess you could avoid the multiply by doing something like: sequence-step-end-index - previous-sequence-end-index but then you'd have to test for the end conditions (tho I've not done it, so I'm not sure). -- Loren
-----Original Message----- From: Loren Stafford [mailto:lstafford@morphics.com] Sent: Tuesday, April 24, 2001 14:30 To: Ron Bickers; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
I don't see any way to do it other than subtract from sequence-step-end-index the product of the batch size and the number of prior batches.
-- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Tuesday, April 24, 2001 13:51 To: Loren Stafford; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This gives me the index of the last item of the batch, but the index is relative to the entire sequence, not just the batch. I need just the number of items in the current batch. The ones listed in the ZQR / Zope Book don't help. Any other ideas? _______________________
Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Loren Stafford [mailto:lstafford@morphics.com] Sent: Tuesday, April 24, 2001 4:43 PM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This is what I've been using in our employee directory listing. Sure looks unfamiliar, tho. Don't know where I found it.
Found <dtml-var "_['sequence-step-end-index']+1"> items.
OK. Now I find it in the ZQR. It's the end index of the current batch. Look in the ZQR for more variables.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Or, better yet, see http://www.zope.org/Members/michel/ZB/AppendixA.dtml "Batch Variables".
-----Original Message----- From: Loren Stafford [mailto:lstafford@morphics.com] Sent: Tuesday, April 24, 2001 13:43 To: Ron Bickers; zope@zope.org Subject: RE: [Zope] dtml-in: number of items in current batch
This is what I've been using in our employee directory listing. Sure looks unfamiliar, tho. Don't know where I found it.
Found <dtml-var "_['sequence-step-end-index']+1"> items.
OK. Now I find it in the ZQR. It's the end index of the current batch. Look in the ZQR for more variables.
-- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Tuesday, April 24, 2001 13:14 To: zope@zope.org Subject: [Zope] dtml-in: number of items in current batch
I can't seem to figure out what sequence- variable to use to get the number of items in the current batch. sequence-step-size gives me the size of the batch as I requested (ex, for <dtml-in ... size="3"> returns 3), but if there are actually only 2 more items to go, what can I use to get the number 2?
Feelin' like a newbie...Thanks! _______________________
Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Loren Stafford -
Ron Bickers