cancel
Showing results for 
Search instead for 
Did you mean: 

How get Alfresco TAGs in Alfresco-Drupal integration ?

luca_sirri
Champ in-the-making
Champ in-the-making
Hi all,
I'm developing the Alfresco-Drupal integration through CMIS using Drupal module (http://www.drupal.org/project/cmis), but I don't find a way to retrieve Alfresco TAGs on Drupal.

Any idea? Is it possible to access and manage tags in Drupal?

Thanks for helping with this!!

this is php code in settings.php file

/*
Repository Configuration
————————
*/

$conf['cmis_repositories'] = array(
  'default' => array(
    'user' => 'admin',
    'password' => 'admin',
    'url' => 'http://it02.cloud.lan:8080/alfresco/s/cmis',
    'label' => 'Alfresco'
  )
);

/*
Drupal-CMIS synchronization
—————————
*/
$conf['cmis_sync_map'] = array(
   /*
   'page' => array(
      'enabled' => TRUE,
      'full_sync_next_cron' => TRUE,
      'cmis_sync_cron_enabled' => TRUE,
      'cmis_sync_nodeapi_enabled' => FALSE,
      'cmis_folderPath' => '/Sites/swsdp/documentLibrary/test4',
   ),
   */
   'content_type_cmis' => array(
      'enabled' => TRUE,
      'full_sync_next_cron' => TRUE,
      'cmis_sync_cron_enabled' => TRUE,
      'cmis_sync_nodeapi_enabled' => FALSE,
      'cmis_folderPath' => '/Sites/swsdp/documentLibrary/presentations',
      'fields' => array(
           'title' => 'cmis:name',
           'field_cmis_objectid' => 'cmis:versionSeriesId',
           'field_name_doc_from_cmis' => 'cmis:contentStreamMimeType',
           'body' =>  'cmis:name'
      )
   )
);

This is the code for CMIS hook

function cmis_sync_sync_cmis_drupal_prepare($cmis_object, $node) {

   $link = "<a target=\"_blank\" href=\"http://newwebsite.esteco.lan/cmis/browser?id=";
   $link = $link . (string)$cmis_object->id ;
   $link = $link . "\">" . $cmis_object->properties['cmis:name']  . "</a>" ;

   if (strstr($cmis_object->properties['cmis:contentStreamMimeType'] ,"text/")){
      $node->body = $node->body . "<br><br><br> ";
   } else {
      $node->body = "<br><br><br> ";
   }
   $node->body = $node->body . "<br><br><br><br><br><br>" . $link ;

   return $node;
}
2 REPLIES 2

uwajeneza
Champ in-the-making
Champ in-the-making
Did you ever find a solution for this? Synchronizing tags or for that matter any other custom field from Alfresco to Drupal?

shambhavi
Champ in-the-making
Champ in-the-making
I have similar requirement, however I am not getting any properties to fetch tags from $cmis_object.. Anybody has any idea?