AnsweredAssumed Answered

Document list custom metadata - Displa property of type category

Question asked by dave84 on Sep 4, 2013
Latest reply on Sep 5, 2013 by dave84
Hi all.

I created my custom metadata templates in order to see custom metadata document and folder in Alfresco Share Document Library, as mentioned here:

<a href=""></a>

I created Custom JavaScript renderers and all works fine but i have a property in my model of type d:category and I want to display the category name (as in document details page) in document library list under the document/folder title. Now i can see only the nodeRef and i don't now how to get the category name from javascript render.

The definition in content model with property of type category (ni:sinistroStato) in my model:

<type name="ni:sinistro">
          <title>Cartellina sinistro</title>
           <property name="ni:sinistroNominativo">
   <property name="ni:sinistroStato">

My custom javascript render is

    * Alfresco Slingshot aliases
    var $html = Alfresco.util.encodeHTML,
    $isValueSet = Alfresco.util.isValueSet;

   if (Alfresco.DocumentList)
   {  "registerRenderer",
           propertyName: "ni_sinistro",
           renderer: function showMetadataDescription(record, label)
                var jsNode = record.jsNode;     
        var desc = "";
      var sinistroNominativo =["ni:sinistroNominativo"];
                desc += '<span class="item" style="display:block; width:100%;">Nominativo: ' + sinistroNominativo + '</span>';
            var sinistroStato =["ni:sinistroStato"];
            if(sinistroStato && checkCustom(campiCustomDaMostrare,"sinistroStato")){
                desc += '<span class="item" style="display:block; width:100%;">Stato: ' + sinistroStato + '</span>';

         return desc;

The return of["ni:sinistroStato"] is the nodeRef of category, is it possible to see the name of category? How can I get the name in custom render javascript (or alternative methods)?