do not display documents viewlet in the main documents folder

This commit is contained in:
Frédéric Péters 2013-07-18 15:31:25 +02:00
parent 4a10236e7c
commit 8546cebcf4
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ class FolderViewlet(grok.Viewlet):
return table
def documents(self):
if self.context.id == 'documents' and aq_parent(self.context).portal_type == 'Plone Site':
# never return anything in the main documents folder
return []
intids = component.getUtility(IIntIds)
intid_catalog = component.getUtility(ICatalog)
portal_catalog = api.portal.get_tool('portal_catalog')