Forums / Developer / adding location / Comment44544
Łukasz Serwatka
Tuesday 01 November 2005 11:28:51 pm
Hi,
Use eZNodeAssignment, example below
$objectID = 10; $object =& eZContentObject::fetch( $objectID ); $nodeAssignment =& eZNodeAssignment::create( array( 'contentobject_id' => $object->attribute( 'id' ), 'contentobject_version' => $object->attribute( 'current_version' ), 'parent_node' => 123, 'is_main' => 0 ) ); $nodeAssignment->store();
This code will add new location for object 10 under object with nodeID 123.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog