AnsweredAssumed Answered

display path of node from noderef

Question asked by ayubalfresco on May 13, 2014
Latest reply on May 14, 2014 by ayubalfresco
I want to show the display path of noderef in share control ftl which I have developed.

Currently its showing as workspace/SpacesStore/8ab12916-4897-47fb-94eb-1ab699822ecb. how can I get the path similar to site/doclibrary/MyFolder ? is there an api to call using noderefstring to get the path in javascript which is part of share custom ftl?

below is my costum script which is part of ftl.


<script type="text/javascript">//<![CDATA[
(function() {

    YAHOO.util.Event.onContentReady("${controlId}-targetPath", function() {
    var params = Alfresco.util.getQueryStringParameters();
    var nodeRef = params.nodeRef;
   
    if(nodeRef!=null){
     var node=Alfresco.util.NodeRef(nodeRef);
     document.getElementById('${controlId}-path').value=node.uri;
     document.getElementById('${controlId}-targetPath').value=nodeRef;
    
    }
});

})();
//]]></script>

Outcomes