Direkt zum Inhalt | Direkt zur Navigation

Benutzerspezifische Werkzeuge

Sie sind hier: Startseite / Tech-Blog / Plone: Transmogrifier sent event

Plone: Transmogrifier sent event

Unfortunately there is no blueprint to send an event after creating objects. So we here is a quick and dirty way to solve this.

Blueprint to send ObjectAddedEvent

[notify]
blueprint = collective.transmogrifier.sections.inserter
key = nothing
condition = python:(
 modules['zope'].event.notify(
     modules['zope'].lifecycleevent.ObjectAddedEvent(
         transmogrifier.context.unrestrictedTraverse(
             item['_path'].lstrip('/')
         )
     )
 ))
value = nothing
abgelegt unter: ,