Back to index

plone3  3.1.7
enableSyndication.py
Go to the documentation of this file.
00001 ## Script (Python) "enableSyndication"
00002 ##title=Enable Syndication for a resource
00003 ##parameters=
00004 
00005 if context.portal_syndication.isSiteSyndicationAllowed():
00006     context.portal_syndication.enableSyndication(context)
00007     msg = 'Syndication+Enabled'
00008 else:
00009     msg = 'Syndication+Not+Allowed'
00010 
00011 target = '%s/synPropertiesForm' % context.absolute_url()
00012 qs = 'portal_status_message=%s' % msg
00013 
00014 return context.REQUEST.RESPONSE.redirect('%s?%s' % (target, qs))