AnsweredAssumed Answered

Customize document-links webscript

Question asked by ljanda on May 2, 2013
Hello,

I want to customize the "document-links" webscript so that a new URL on our client's web page is displayed there among other links.

This web script can be found under:


/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/document-details/


I copy  the document-links.get.html.ftl  and document-links.get.properties files to my extension folder under:


/share/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/document-details/


Then I add the following code to document-links.get.html.ftl:


   <!– custom link –>
   <div id="${el}-custom">
      <div class="url-title"><label for="${el}-custom-url">${msg("document-links.custom")}</label></div>
      <input id="${el}-custom-url" class="link-value" />
      <input id="${el}-custom-button" type="button" class="copy-button" value="${msg("document-links.copy")}" />
   </div>


and the following definition to document-links.get.properties:


document-links.custom=Custom Page URL


I restart Alfresco and it's working. Partially, an empty input field is displayed.

Now I need to get the custom URL displayed as a value of "<input id="${el}-custom-url" class="link-value" />"

It should be something like
"http://custom-website.com/" + nodeId 
of the document I'm previewing in Share.

How to do it?

Thanks

Outcomes