Showing title of node instead of name in document library

cancel
Showing results for 
Search instead for 
Did you mean: 
dlam
Member II

Showing title of node instead of name in document library

We're creating folders in the document library programmatically and would like to show the cm:title property of a node instead of the name in the ui. For the center page it is already done, but how/where would we customize the display of the breadcrumb and the tree on the left?

We looked at /tomcat/webapps/share/components/documentlibrary/tree.js but not sure how to get the title of a node.

2 Replies
jpotts
Professional

Re: Showing title of node instead of name in document library

If you look at that tree.js you'll see a function called _buildTreeNodeUrl. In that function you can see the repo tier web script call that gets invoked to return information about the node and the node's children.

The URL that gets built is something like:

http://localhost:8080/alfresco/s/slingshot/doclib/treenode/site/some-site-id/documentLibrary?perms=f... 

If you look at the response that comes back you'll notice that the title is missing.

So in order to get this to work you'll probably have to extend that web script to add the title to the JSON that comes back. Once you do that, you can extend the Alfresco.DocListTree component with your own that retrieves the title that comes back from the web script.

This will likely be a fairly involved little customization and will require extensive testing to make sure that swapping that out does not have unintended side effects.

dlam
Member II

Re: Showing title of node instead of name in document library

Thanks! We got the tree working, do you know which js controls the breadcrumb on top?