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
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
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.