AnsweredAssumed Answered

Include category in document library custom view

Question asked by juschroeg on Feb 26, 2014
Latest reply on Mar 3, 2014 by juschroeg
Dear all,

first of all my apologies, if this might be an obvious question. I am new to Alfresco and try my best to fit it to our needs.
I created a custom aspect mainly following this <a href="http://www.avadaj.com/2012/07/12/adding-custom-aspects-to-alfresco-4-0/">instruction</a> and then went on to work on a custom table render, that will display my new labels.(adapting the share-documentlibrary-config)

As the category label is displayed in the detailled view, I figured I should be able to include it in my custom table (based on the dublin-core render).
This is my customized dublin-core render so far:

<view-renderer id="dublin_core" iconClass="table" label="Projekttabelle" index="80" widget="Alfresco.DocumentListTableViewRenderer">
               <dependencies>
                  <js src="components/documentlibrary/documentlist-view-detailed.js" />
                  <js src="components/documentlibrary/documentlist-view-table.js" />
                  <css src="components/documentlibrary/documentlist-view-table.css" />
               </dependencies>
               <json-config>
                  {
                     "actions": {
                        "show": "true"
                     },
                     "indicators": {
                        "show": "true"
                     },
                     "selector": {
                        "show": "true"
                     },
                     "thumbnail": {
                        "show": "true"
                     },
                     "propertyColumns": [
                        {
                           "property": "name",
                           "label": "table.dublincore.label.name",
                           "width": "300"
                        },
                        {
                           "property": "cm:title",
                           "label": "table.dublincore.label.title"
                        },
                        {
                           "property": "cu:year",
                           "label": "Jahr"
                        },
                        {
                           "property": "cu:contactperson",
                           "label": "Ansprechpartner"
                        },
                        {
                           "property": "cm:description",
                           "label": "table.dublincore.label.description"
                        },
                        {
                           "property": "cu:publishable",
                           "label": "Veröffentlichung erlaubt"
                        }
                     ]
                  }
               </json-config>
            </view-renderer>


Can anybody help me to figure out the right reference to include the categories here?
My trial & error approach brought me here, with this, the number of categories assigned to the document is shown:

                        {
                           "property": "cm:categories",
                           "label": "Kategorie",
                        }

Not very useful for my purpose though.
Thanks for your comments,

Julian

Outcomes