I'd like to use the dtml-in tag to get the number of files in a specific folder. Tom Scheidt | www.falsemirror.com | tom@falsemirror.com -------------------------------------------------------
<dtml-in "objectValues()"> <dtml-var sequence-length> </dtml-in> This prints out the value every time though so you might do a return or do a request set depending upon what you are doing, or use a first / last system... <dtml-in "objectValues()"> <dtml-if sequence-end> <dtml-var sequence-length> </dtml-if> </dtml-in> Prints only once ----- Original Message ----- From: "Tom Scheidt" <tom@falsemirror.com> To: <zope@zope.org> Sent: Friday, July 21, 2000 2:58 PM Subject: [Zope] dumb dtml-in question
I'd like to use the dtml-in tag to get the number of files in a specific folder.
Tom Scheidt | www.falsemirror.com | tom@falsemirror.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 )
How about just: <dtml-var "_.len(folder.objectIds())"> --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ----- Original Message ----- From: Andy McKay <AndyM@ActiveState.com> To: <zope@zope.org> Sent: Friday, July 21, 2000 3:53 PM Subject: Re: [Zope] dumb dtml-in question
<dtml-in "objectValues()"> <dtml-var sequence-length> </dtml-in>
This prints out the value every time though so you might do a return or do a request set depending upon what you are doing, or use a first / last system...
<dtml-in "objectValues()"> <dtml-if sequence-end> <dtml-var sequence-length> </dtml-if> </dtml-in>
Prints only once ----- Original Message ----- From: "Tom Scheidt" <tom@falsemirror.com> To: <zope@zope.org> Sent: Friday, July 21, 2000 2:58 PM Subject: [Zope] dumb dtml-in question
I'd like to use the dtml-in tag to get the number of files in a specific folder.
Tom Scheidt | www.falsemirror.com | tom@falsemirror.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 )
_______________________________________________ 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 (3)
-
Andy McKay -
Jonothan Farr -
Tom Scheidt