cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Links from node-header in document-details

d_franz
Champ on-the-rise
Champ on-the-rise
I want to reduce the links I can see on the Document-Details View. I have already created a Module to reduce the ActionGroups on the right side.
Now my problem is to hide the fields “favorite” “like” and “comment” from the node-header.
[img]http://www.freeimagehosting.net/t/cee7b.jpg[/img]

I have already changed the Metadata-Template:
<config evaluator="string-compare" condition="DocumentLibrary"  replace="true">
         <!– Default (fallback) –>
         <template id="default">
            <line index="10" id="date">{date}{size}</line>
            <line index="20" id="description" view="detailed">{description}</line>
            <line index="30" id="tags" view="detailed">{tags}</line>
            <!–line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line–>
            <!–line index="50" id="social" view="detailed">{social}</line–>
         </template>
      </metadata-templates>
    </config>

But this only takes effect on the library browser.

It would be realy great if somebody could help me.
14 REPLIES 14

ddraper
World-Class Innovator
World-Class Innovator
Have you attached a debugger to see whether or not your extension is being called or not?

mitpatoliya
Star Collaborator
Star Collaborator
you mean to say with spring-surf debugger? or alfresco javascript debugger?
I have not done anything related to this please point out where to look for it?

mitpatoliya
Star Collaborator
Star Collaborator
Hi Dave,
Finally I am able to load my javascript controller which is hiding "Likes" and "Favourite" links
but now the problem is I need to make it conditional based on certain aspect on the node.

So, now how can I check the particular aspect is applied on the noderef or not?
here is my controller node-header.get.js


<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
for (var i=0; i<model.widgets.length; i++)
{
if (model.widgets.id == "NodeHeader")
{

  if(model.widgets.options.nodeRef!=null)
    {
      var nodeDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site);
    // var jsNode = new Alfresco.util.Node(model.widgets.options.nodeRef);
     if(model.widgets.options.node.hasAspect("custom:customAspect")){
        model.widgets.options.showFavourite = false;
        model.widgets.options.showLikes = false;        
     }
    }
}

}

ddraper
World-Class Innovator
World-Class Innovator
Hi Mits,

Apologies for not getting back to you sooner on this… been a bit preoccupied with other stuff and not had the time to look at the forums of late. It looks from another post that you might have got annswer to this question now?

Regards,
Dave

mitpatoliya
Star Collaborator
Star Collaborator
Thanks Dave for your concern,

I am able to override it just has one small problem I want to check if node has particular aspect applied or not I am trying like this
https://forums.alfresco.com/comment/135649#comment-135649

but it's failing please suggest.I know it must be just a single line of code but I am not able to hit it right.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.