Exemple #1
0
def syndicateFolderishObject(object, event):
    """ Enable RSS feed upon FolderishObject creation. """
    if not hasattr(object.aq_explicit, "syndication_information"):
        syInfo = SyndicationInformation()
        object._setObject("syndication_information", syInfo)
        portal = object.portal_url.getPortalObject()
        portal_syn = portal.portal_syndication
        syInfo = object._getOb("syndication_information")
        syInfo.syUpdatePeriod = portal_syn.syUpdatePeriod
        syInfo.syUpdateFrequency = portal_syn.syUpdateFrequency
        syInfo.syUpdateBase = portal_syn.syUpdateBase
        syInfo.max_items = portal_syn.max_items
        syInfo.description = "Channel Description"
Exemple #2
0
    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"
Exemple #3
0
    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"