AnsweredAssumed Answered

Alfresco.DocListCategories On A different Level

Question asked by redtreetom on Jan 17, 2013
Hi,

Alfresco 4.1 entreprise.

Im trying to show categories from a sub level.
For example by default you have categories

Categories Root –> Regions

When you navigate to the repository browser you can select categories. Here by default it will show you everything under Category root.
Instead of this behavior i want it to show everything under Regions. This would be on all sites and default repository browser, it is also hard coded (POC)

the script is located under

Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\categories.get.html.ftl

The root folder is defined with

new Alfresco.DocListCategories("${el}").setOptions(
   {
      nodeRef: "alfresco://category/root",
      evaluateChildFolders: ${evaluateChildFolders!"true"}
   }).setMessages(
      ${messages}
   );

i have tried to modify the script to

new Alfresco.DocListCategories("${el}").setOptions(
   {
      nodeRef: "alfresco://category/root/Regions",
      evaluateChildFolders: ${evaluateChildFolders!"true"}
   }).setMessages(
      ${messages}
   );

At first glance this works as the default root is now Regions, however the url it generates is not correct.

Url generated before modifications : #filter=category%7C%2FRegions%2FAFRICA&page=1
Url generated after   modifications : #filter=category%7C%2FAFRICA&page=1

I then went to this page for the API
http://sharextras.org/jsdoc/share/enterprise-4.0.0/symbols/Alfresco.DocListCategories.html

I have tried adding the options

currentPath : "Regions"
selectedNode : "Regions"
currentFilter : "Regions"

But the options seem to be ignored.

has anyone got an idea what im doing wrong ?

Outcomes