Subscribers Zope 3 style
This was originally posted on blogger here.
Vernon Chapman shared this with me. Very elegant.
configure.zcml (brackets replacing XML open/close because Blogspot sucks!)
[subscriber for="Products.CMFCore.interfaces.IActionSucceededEvent" handler=".handlers.vernstuff_content_thing" /]handlers module
def vernstuff_content_thing(event): """This will do all the work""" action_as_string = event.action content = event.object # Do whatever you like here
Tags: zope legacy-blogger