As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hello everyone,
I want to hide the download button in the document previewer for the specific custom content type. Right now I have hidden download button for every document in alfresco by updating AlfrescoUtil.param("showDownload", "false"); and showDownload : (model.showDownload == "false") and in node-header.get.js. How can I achieve this for specific custom content types, i.e. for one particular content type download button in the document previewer will be hidden while documents of other content types can see the Download button in the document previewer?
Thanks
Yash
Hello,
In your case I would implement a custom repository service, with noderef as param, that will return the value of showing the download button comparing node's type with a list of predefined types.
Then I would call this service from node-header.get.js and set showDownload option of NodeHeader component.
You have two options to achieve that using share extension mechanism:
Overwriting it or extending it and changing the value of the property in the component.
Regards
Hi Yash,
In node-header.get.js,there is one object which is getting all the details of node.
var nodeDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site, null, model.libraryRoot);
This object is providing properties,mimetype,parent details and all.....
You can use it to get content type of document ex. nodeDetails.item.node.type;
Thanks,
Sanjay