a object is multi node?

Author Message

Bermudez Alban

Thursday 16 February 2006 2:33:06 am

Hello world,

When i create à file, i save it in a folder. But ez show the file in two node. My file is visible in my folder and in the base of my content structure :
Content structure
-- My file
-- My folder
-- -- My file

			$nodeAssignment =& eZNodeAssignment::create( array( 'contentobject_id' => $contentObject->attribute( 'id' ),
										'contentobject_version' => $contentObject->attribute( 'current_version' ),
										'parent_node' =>  $mainAttribute->attribute( 'contentobject_id'),
										'sort_field' => 2,
										'sort_order' => 0,
										'is_main' => 1 ) );		
			 $nodeAssignment->store(); 
      //Rajout AB                
      $node = new eZContentObjectTreeNode();
      $node->setAttribute( 'contentobject_version', 1 );
      //$node->setAttribute( 'path_identification_string', $mainAttribute->attribute('name').'/Test' );
      $node->setAttribute( 'contentobject_id', $contentObject->attribute( 'id' ) );
      $node->setAttribute( 'parent_node_id', $mainAttribute->attribute('contentobject_id'));
      $node->setAttribute( 'main_node_id', $contentObject->attribute( 'id' ) );
      $node->setAttribute( 'path_string', '/1/2/'.$mainAttribute->attribute('contentobject_id').'/'.$contentObject->attribute( 'id' ).'/' );
      $node->setAttribute( 'depth', 2 );
      $node->setAttribute( 'contentobject_is_published', 1 );
      $node->setAttribute( 'node_id', $contentObject->attribute( 'id' ) );
  		$node->setAttribute( 'sort_field', 2);
  		$node->setAttribute( 'sort_order', 0 );
      $node->setName( $mainAttribute->attribute('name') );
      $node->setContentObject( $contentObject );	
      $node->updateSubTreePath();
      $node->store();	
      eZContentObjectTreeNode::updateNodeVisibility( $node, $mainAttribute, false );                    
      //Fin rajout AB			 
			
			$version =& $contentObject->version( 1 );
			$contentObjectAttributes =& $version->contentObjectAttributes();
			$contentObjectID =& $contentObject->attribute( 'id' );

      //include_once('lib/ezutils/classes/ezoperationhandler.php');
      $operationResult = eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $contentObjectID,
                                                                                'version' => 1 ) );      

how can i just show the file in my folder?

Thnaks.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.