You are here: Home Plone My Python Scripts Get number of objects via path
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 463
Total Pages: 284
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 03.02.2012 16:00
 

Get number of objects via path

by Wyden Silvan last modified 26.11.2009 14:32

#you have to set as paramter list:  path,type=''
from Products.CMFCore.utils import getToolByName
portal_catalog = getToolByName(context, 'portal_catalog')

mytup = context.portal_catalog.searchResults(
    path = path,
    Type = type,
    sort_on = 'getObjPositionInParent')

return len(mytup)