def manage_afterAdd(self, item, container): # Do internal ID management # Find out max category ID if not self.getInternal_id(): a_id = 0 for cat in container.objectValues([self.meta_type]): try: a_id = max(cat.getInternal_id(),a_id) except: pass self.setInternal_id(a_id + 1) #Call base class initialize method ATCTFolder.manage_afterAdd(self, item, container)
def initializeArchetype(self, **kwargs): ret_val = ATCTFolder.initializeArchetype(self, **kwargs) # Enable topic syndication by default syn_tool = getToolByName(self, "portal_syndication", None) if syn_tool is not None: if syn_tool.isSiteSyndicationAllowed() and not syn_tool.isSyndicationAllowed(self): syn_tool.enableSyndication(self) return ret_val
def initializeArchetype(self, **kwargs): ret_val = ATCTFolder.initializeArchetype(self, **kwargs) # Enable topic syndication by default syn_tool = getToolByName(self, 'portal_syndication', None) if syn_tool is not None: if (syn_tool.isSiteSyndicationAllowed() and not syn_tool.isSyndicationAllowed(self)): syn_tool.enableSyndication(self) return ret_val
def initializeArchetype(self, **kwargs): self.allow_discussion = False ret_val = ATCTFolder.initializeArchetype(self, **kwargs) # Enable topic syndication by default syn_tool = getToolByName(self, 'portal_syndication', None) if syn_tool is not None: if (syn_tool.isSiteSyndicationAllowed() and \ not syn_tool.isSyndicationAllowed(self)): syn_tool.enableSyndication(self) return ret_val
def initializeArchetype(self, **kwargs): ret_val = ATCTFolder.initializeArchetype(self, **kwargs) return ret_val