Wednesday 04 January 2006 5:25:33 am
I'm trying to find the url of a particular object. For this my guess was to first find the mainNode attached to the document (ezcontentobject):
$process_id = $this->attribute("process_id");
$process_document = eZContentObject::fetch( $process_id );
if( !is_object($process_document) ) {
eZDebug::writeError( 'Unable to identify the process_document. Process ID = '. $process_id );
return;
}
$process_main_node = $process_document->mainNode();
if( !is_object($process_main_node) ) {
eZDebug::writeError( 'Unable to identify the process_main_node.' );
}
$process_url = $process_main_node->attribute( 'url_alias' );
The above code gives me an <i>"Unable to identify the process_main_node"</i>. What should I do instead to get the URL of the $process_document?
|