cancel
Showing results for 
Search instead for 
Did you mean: 

Hide comment link in document details

netfisher777
Champ in-the-making
Champ in-the-making
Hi all!

I'm writing an amp module for hiding some content in alfresco share and now need to hide all links in document details node-header component (likes, favourite, share, comment)
I was successfully remove likes, favourite and share links, but not comment.

Here is what i'm trying to do:

src/main/amp/config/alfresco/web-extension/site-data/extensions/interface-cut-plugin-extension-modules.xml:



<extension>
<modules>
    <module>
        <id>Remove Likes, Favourite and Share links from document details</id>
        <auto-deploy>true</auto-deploy>
        <customizations>
            <customization>
                <targetPackageRoot>org.alfresco.components.node-details</targetPackageRoot>
                <sourcePackageRoot>com.somepackage</sourcePackageRoot>
            </customization>
        </customizations>
    </module>
</modules>
</extension>



src/main/amp/config/alfresco/web-extension/site-webscripts/com/somepackage/node-header.get.js:


for (var i=0; i<model.widgets.length; i++)  {
    if (model.widgets.id == "NodeHeader") {
        model.widgets.options.showFavourite = false;
        model.widgets.options.showLikes = false;
        model.widgets.options.showQuickShare = false;
        model.widgets.options.showComments = false;
    }
}



Any suggestions?

Alfresco SDK version - 2.1.1 (Community)
1 REPLY 1

netfisher777
Champ in-the-making
Champ in-the-making
Problem was solved by setting showComments property in model to false


for (var i=0; i<model.widgets.length; i++)  {
    if (model.widgets.id == "NodeHeader") {
        model.widgets.options.showFavourite = false;
        model.widgets.options.showLikes = false;
        model.widgets.options.showQuickShare = false;
        model.widgets.options.showComments = false;
    }
}
model.showComments = "false";