cancel
Showing results for 
Search instead for 
Did you mean: 

how to hidden this buttons?

805654685
Champ in-the-making
Champ in-the-making

5 REPLIES 5

krutik_jayswal
Elite Collaborator
Elite Collaborator

Inside share-config-custom.xml, you need to use predefined elevator for disabling actions.You can use below evaluator for permanently disable the action.

evaluator.doclib.action.disableAction

Example : For disabling download actions

<config evaluator="string-compare" condition="DocLibActions">

<actions>
<!-- Download document -->
<action id="document-download" type="link" label="actions.document.download">
<param name="href">{downloadUrl}</param>
<param name="target">_blank</param>
<evaluator>evaluator.doclib.action.disableAction</evaluator>
</action>

</config>

For more details regarding predefined evaluators.

Document Library Predefined Evaluators 

Refer below link for creating custom evaluator

Evaluators in alfresco share | Krutik Jayswal 

oh  thanks ! I do it as you say, but it doesn't work

<!-- Download document -->
<action id="document-download" type="link" label="actions.document.download">
<param name="href">{downloadUrl}</param>
<param name="target">_blank</param>
<evaluator>evaluator.doclib.action.disableAction</evaluator>
</action>

Is it the wrong value of label?

Because of the screen shot not being in my language, I am not able to identify the action id, you need to figure on your own.Above code should be in proper place and it will only disable the download action.

the button called "View in a browser" ,But I don't know where to find the right lable value.

<action id="document-view-content" type="link" label="actions.document.view">
<param name="href">{viewUrl}</param>
<evaluator>evaluator.doclib.action.disableAction</action>