AnsweredAssumed Answered

Access a property of type d:content

Question asked by laurent1050 on Apr 12, 2011
Latest reply on Aug 27, 2013 by benswitzer
Hi,

I've created an aspect with a property of type d:content.
I've applyed this aspect to all my folders, and I'm now able in Share to add an html description to all my folders. Great !

<aspect name="poste:descriptionable">
   <title>Rich description of a folder</title>
   <properties>
      <property name="poste:richDescription">
         <title>Rich description</title>
         <description>Rich description of a folder</description>
         <type>d:content</type>
         <protected>false</protected>
         <mandatory>false</mandatory>               
      </property>
   </properties>
</aspect>

Now I want to access this property in a webscript :

var currentFolder = search.findNode(currentNodeRef);
if (currentFolder.hasAspect("poste:descriptionable")) {
   model.desc = currentFolder.properties["poste:richDescription"];
}

In my ftl, when I try ${desc}, the result is org.alfresco.repo.jscript.ScriptNode$ScriptContentData@1f8c9e8, but I don't know how to access the content of this property.

How can I show the content of my property "poste:richDescription" (it's an HTML description) in my ftl ?

Any help is welcome,

Laurent

Outcomes