Creating multiple object at the same time

Author Message

Marko Žmak

Sunday 06 November 2005 5:33:42 am

This is what I need:

Create an object. Create several objects that are children of that newly created object. But need to do it all in ONE form, and to be able to add children of the newly created node, while the object is still in edit mode.

Is this possible, and how?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Gurudutt Verma

Wednesday 09 November 2005 1:58:52 am

Hi!

I haven't tried this but code shows that this is not possible to publish object below object which is not published yet.

Yes you can create an seperate module for this in which first you publish parent node and after that try to publish all the children but I dought if it will be possible to validate attributes of children node using this method :-(

Xavier Dutoit

Wednesday 09 November 2005 2:45:39 am

Hi,

Gurudutt Verma is right.

If you only have simple attributes (text, xmlarea, int...), you can write your own module, create the parent node, populate its attribute, publish it, create the children node, populate the attributes and publish them.

Have a look at the contrib (eg the ObjectCreator extension/ObjectCreator/modules/ObjectCreator/ezobjectcreator.php ) for the code.

X+

http://www.sydesy.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.