cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED]Read title of Type Model

ersecchio
Champ in-the-making
Champ in-the-making
if I have a model so that:


<type name="sc:document">
        <title>Personal document</title>
etc etc

to read the type of document I use:

<#list nodes as document>
type document:   ${document.typeShort }
</#list>
   
but this method reads: "sc:document" ,
how do I read the title:"personal document" ?

thanks
4 REPLIES 4

sufo
Star Contributor
Star Contributor
Try: ${document.properties.title}

ersecchio
Champ in-the-making
Champ in-the-making
Try: ${document.properties.title}


in this way gives me the title of the document and not the title of the type.

could someone help me?
Smiley Sad

openpj
Elite Collaborator
Elite Collaborator
The title of the type can be taken only using the DictionaryService of Alfresco but this service is not exposed by the Freemarker Template API and the JavaScript API.

You have to implement your own ScriptDictionaryService to expose this class as a new object in the JavaScript API and then using this new data in the Freemarker Template:
http://wiki.alfresco.com/wiki/3.4_JavaScript_API#How_is_Scripting_integrated_into_Alfresco.3F
Hope this helps.

ersecchio
Champ in-the-making
Champ in-the-making
a solution can be implemented in javascript would be to use an associative array.
is much faster!

ie:

var arrayassociative= { "sc:model":"mymodel", "sm:model":"modeltwo" }
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.