Forums / Developer / Automating the creation of a new object after publishing

Automating the creation of a new object after publishing

Author Message

Lo' F.

Thursday 21 July 2011 8:08:28 am

Hello everybody!

Here's what I need:

After publishing objects of a certain class, I need to automate the creation of a new object of a related [sub-]class.

In other words, currently, following the creation of an object of this class, I have to create another object under it which is bound up with its parent. This is something I do manually but it's not handy, so if after publishing the main object I could launch the creation of a new object of a specific class under its node that would be great.

How could I manage to accomplish that?

loredanaebook.it

Damien Pobel

Thursday 21 July 2011 1:14:12 pm

Hi,

To execute an action after an object is published you can write a after publish worflow event type or a content edit handler. For workflows, there's a nice tutorial on how to write a custom workflow event. For content edit handlers, the most relevant publication is probably this article from Ɓukasz.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish