def updateEntryLayout(obj, event): """ Reset entry layout if modified postable object hasn't the blogging markup""" if not IEntryMarker.providedBy(obj): if obj.getLayout() == 'entry-view': ptypes = getToolByName(obj, 'portal_types') type_info = ptypes.getTypeInfo(obj.portal_type) obj.setLayout(type_info.default_view)
def initEntryLayout(obj, event): """ Set entry layout if postable object is created with the blogging markup """ if IEntryMarker.providedBy(obj): obj.setLayout('entry-view')
def available(self): if IEntryMarker.providedBy(self.context): return False else: return True
def is_entry(self): return IEntryMarker.providedBy(self.context)
def available(self): if not IEntryMarker.providedBy(self.context): return False if self.context.portal_type not in self.data.restrict_types: return False return True