Forums / Developer / Get the new node_id / Comment44024

Author Topic

Kristof Coomans

Tuesday 30 August 2005 9:46:57 pm

Comment44024

After you've published the content, you can fetch the node and node ID with the following code:

$objectID =& $contentObject->attribute( 'id' );
$parentNodeID =& $parentContentObjectTreeNode->attribute( 'node_id' );

$node =& eZContentObjectTreeNode::fetchNode( $objectID, $parentNodeID );

$nodeID =& $node->attribute( 'node_id' );

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org