Share » Forums » Developer » Finding the url of a document?

Finding the url of a document?

Finding the url of a document?

Wednesday 04 January 2006 5:25:33 am - 1 reply

Author Message

Ɓukasz Serwatka

Tuesday 10 January 2006 3:06:13 am

Hi Kristofer,

Try with

       $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;
                }

               $nodeID = $process_document->attribute('main_node_id');
               $process_main_node =& eZContentObjectTreeNode::fetch( $nodeID );

       if( !is_object($process_main_node) ) {
               eZDebug::writeError( 'Unable to identify the process_main_node.' );
       }

       $process_url = $process_main_node->attribute( 'url_alias' );

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu