New file notification

cancel
Showing results for 
Search instead for 
Did you mean: 
sistemi
Active Member II

New file notification

Jump to solution

Hello, we recently moved from Alfresco 3.2 to the latest 2017 one. Now we are trying to recreate rules from the old Alfresco, and we did not manage to have "new file notification by email" properly working. In Alfresco 3.2 it was:

....

You can view it through this link:
${url.serverPath}/alfresco${document.url}

Or through the Alfresco client:
<#assign ref=space.nodeRef>
<#assign workspace=ref[0..ref?index_of("://")-1]>
<#assign storenode=ref[ref?index_of("://")+3..]>
${url.serverPath}/alfresco/navigate/browse/${workspace}/${storenode}

....

But ${document.url} and all the code to get ${workspace} and ${storenode} does not work anymore.

From the new templates I guess that ${document.url} is now substituted by  ${document.shareUrl}, but what about ${workspace} and ${storenode}? Do you have any clue?

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: New file notification

Jump to solution

You are right about the ${document.shareUrl}.

That one will give you the url to find the document.

You can create the link using something like this inside the template:

<a href="${document.shareUrl}">${document.name}</a>

View solution in original post

3 Replies
douglascrp
Advanced II

Re: New file notification

Jump to solution

You are right about the ${document.shareUrl}.

That one will give you the url to find the document.

You can create the link using something like this inside the template:

<a href="${document.shareUrl}">${document.name}</a>

sistemi
Active Member II

Re: New file notification

Jump to solution

Thanks Douglas for the help, the links you suggested are ok in the email. Is there also way to obtain the link to the folder containing the document, e.g.: http://alfresco:8080/share/page/context/mine/myfiles#filter=path%7C%2Ftest%2Fsmartfolder&page=1 ?

douglascrp
Advanced II

Re: New file notification

Jump to solution

I believe there is no such parameter ready to use (at least, I do not it).

What you can do is to check the source code and try to find how it is created.

A good starting point is the breadcrumb component, as it creates the links for it.