You are here: Home Plone My Python Scripts Make a search and returns all Events from the current folder and subfolder
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
 

Make a search and returns all Events from the current folder and subfolder

by Wyden Silvan last modified 03.11.2009 16:02

from Products.CMFCore.utils import getToolByName
portal_catalog = getToolByName(context, 'portal_catalog')
return portal_catalog.searchResults(path = {'query' : '/'.join(context.getPhysicalPath()), 'depth' : 0}, Type = 'Event') 

Whe you make it without the 'path' Attribut it searches the whole Page!