14 May
2004
14 May
'04
7:10 p.m.
On Fri, 2004-05-14 at 09:54, Laura McCord wrote:
I am starting out with this in my script
RESPONSE = context.REQUEST.RESPONSE success = 0 for id in context.objectIds(): success = success + 1 return success
All this does is count the contents in the folder. However, how do you specify what content to count. For instance, I do not want this script to count itself in the folder contents but I want it to include everything else. Any suggestions?
Trivial case: if success: return success - 1 else: return 0 Otherwise, you can provide objectIds a list of content types to include (see the Zope API Refererence), or you can manually exclude types by checking inside your loop. -- Jud <lists@dagnall.net> http://www.dagnall.net