Manage Links in Alfresco

In Alfresco we have a concept of Links which acts like shortcuts within repository. For instance we have a folder which we need to show in two different hierarchies creating duplicate copy is not a solution to achieve that because it will be difficult to keep both copy in sync.

So, Links comes to rescue in that case. We can create a link of folder or content and make it available wherever we want to place. By this we can make it available within multiple hierarchies in same repository.

Here is how it looks like in alfresco User Interface.

Folder Link in Alfresco Share

Folder Link in Alfresco Share

There are basically two type of links related types defined in out of box application content model of alfresco.


<type name=”app:filelink”>

<title>File Link Object</title>



Folder Link

<type name=”app:folderlink”>

<title>Folder Link Object</title>



Both of them are extending basic Link type defined in the out of box Alfresco content model.

  <type name="cm:link">

         <title>Link Object</title>



            <property name="cm:destination">

               <title>Link Destination</title>






We can also create links using javascript.

Here is the script to create link

var pr = [];

//Setting properties in Array to associate with link node during creation

pr["cm:name"] = "abcurl";

//NodeRef of destination folder for which we are creating link this is normally retrieved by searching //within repository but here for sake of simplicity it is hard coded

pr["cm:destination"] = "workspace://SpacesStore/429006d5-9f76-4855-aa23-654b76788759";

pr["cm:title"] = "abc.logurl";

pr["cm:description"] = "abc.logurl descitpion";

//Creating Folder link with aspect pr and name “abcurl”

linkNode = space.createNode("abcurl", "{}folderlink", pr);

//save created link node;

To create content link you need to set type accordingly in above code.

Hope this will help you to meetup some of the requirements in your alfresco setup. Most of the times this is missed because of lack of documentation related to this.

Looking for quality Alfresco Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight


I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *