def _make_info(self): """Add an old style SyndicationInfo to the folder""" from Products.CMFDefault.SyndicationInfo import SyndicationInformation info = SyndicationInformation() info.syUpdateBase = DateTime() info.syUpdatePeriod = 1 info.syUpdateFrequency = 1 info.isAllowed = 1 info.max_items = 5 return info
def enableSyndication(self, obj): """ Enable syndication for the obj """ if not self.isSiteSyndicationAllowed(): raise 'Syndication is Disabled' if hasattr(aq_base(obj), 'syndication_information'): raise 'Syndication Information Exists' syInfo = SyndicationInformation() obj._setObject('syndication_information', syInfo) syInfo = obj._getOb('syndication_information') syInfo.syUpdatePeriod = self.syUpdatePeriod syInfo.syUpdateFrequency = self.syUpdateFrequency syInfo.syUpdateBase = self.syUpdateBase syInfo.max_items = self.max_items syInfo.description = "Channel Description"