03-19-2019 02:41 AM
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
03-19-2019 06:50 AM
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
03-22-2019 11:40 PM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.