def mark(self): if not IBlogContainer.providedBy(self.context): interface.directlyProvides(self.context, IBlogContainer)
def __call__(self): context = self.context if context.portal_type not in ('Plone Site', 'Folder'): context = self.context.aq_inner.aq_parent return IBlogContainer.providedBy(context)