Monday 02 May 2011 1:21:25 am
Hello, i use to work with sqliimport but i try to do multilocation and it does not succeed : here is a part of my code which work :
$contentOptions = new SQLIContentOptions( array(
'class_identifier' => 'agence',
'remote_id' => (string)md5($row->etab."-".$row->guichet),
'creator_id' => 14
) );
$content = SQLIContent::create( $contentOptions );
$content->fields->nom_du_guichet = (string) $row->nomguichet;
$content->fields->entite = (string) $row->etab;
$content->addLocation( SQLILocation::fromNodeID( $parentnodeid ) );
$publisher = SQLIContentPublisher::getInstance(); $publisher->publish( $content ); the same with multilocation to contentroot et mediaroot doesn't work :
$contentOptions = new SQLIContentOptions( array(
'class_identifier' => 'agence',
'remote_id' => (string)md5($row->etab."-".$row->guichet),
'creator_id' => 14
) );
$content = SQLIContent::create( $contentOptions );
$content->fields->nom_du_guichet = (string) $row->nomguichet;
$content->fields->entite = (string) $row->etab;
$content->addLocation( SQLILocation::fromNodeID( $parentnodeid ) );
$content->addLocation( SQLILocation::fromNodeID( 2 ) );
$content->addLocation( SQLILocation::fromNodeID( 43 ) );
$publisher = SQLIContentPublisher::getInstance(); $publisher->publish( $content ); thanks a lot for your help. Alexandre
Paris, France
|