Forums / Developer / Populate User Object / Comment46596
Claudia Kosny
Wednesday 30 August 2006 12:49:22 pm
Hello Rob,
For me it worked once I fetched the version of the contentobject and then changed the contentattributes of this version.Something like thsis:
//create and instantiate the object, assign a node $version =& $contentObject->version(1); //it is a new contentobject, thus version 1 $version->setAttribute('created', $now); $version->setAttribute('modified', $now); $version->setAttribute('status', EZ_VERSION_STATUS_DRAFT); $version->store(); $contentObjectAttributes =& $version>contentObjectAttributes(); //set and store the contentobjectattributes //publish the node
Hope it helps
Claudia