cancel
Showing results for 
Search instead for 
Did you mean: 

CIFS path in webscript

dgenard
Champ on-the-rise
Champ on-the-rise
Hi,

I'd like to insert a link in a webscript template to edit a document via CIFS.
I can write something like :
  <a href="file://\\SERVERA\alfresco\Path to document">Edit</a>
and it works fine, but the server name is hardcoded (SERVERA in this case), which is obsiously not a good practice…
I coundn't find any freemarker expression to produce the server name. Any idea ?

Denis
4 REPLIES 4

cbosdonnat
Champ in-the-making
Champ in-the-making
Hi Denis,

You should have a look at the org.alfresco.web.ui.common.Utils#generateURL() static method. This method can generate the URL for you. Then to use it from any Freemarker code, you will need to create your own root object calling this method. For this, simply read this section of the template page of the wiki: http://wiki.alfresco.com/wiki/Template_Guide#Custom_Root_Objects.

HTH

dgenard
Champ on-the-rise
Champ on-the-rise
Thanks for your answer. I hoped there is an easier solution…
I've found a JIRA issue covering this feature : https://issues.alfresco.com/browse/ETWOONE-189

Denis

mliedtke
Champ in-the-making
Champ in-the-making
Hi Denis,
Were you ever able to get this working?  I'm in the same situation.

Thanks,
Mark

dgenard
Champ on-the-rise
Champ on-the-rise
No, I still have no easy solution.
Feel free to vote for the mentionned JIRA issue in hope it will be solved…

Denis