this is a Script (Python) that returns objects that are under folders that have an attribute called published which is true.
pub = []
for folder in context.ZopeFind(context.restrictedTraverse(context.REQUEST.VirtualRootPhysicalPath), obj_metatypes=('Folder',), search_sub=1):
if hasattr(folder, 'published') and folder.published:
pub.append(folder.absolute_url())
pub.append(folder)
return pub
|