Is it possible to share a document between two or more different sites?
I know of links and smart folders, but I don't want the user to leave the site when the document is opened.
From the user's perspective, it should look like the document is in the current site.
//Andreas
I never tested on Share but typically you can use the association engine of the repo to avoid duplicating contents among spaces. You could add a secondary parent to your content in order to make it visible inside two different spaces.
Adding a secondary parent in Alfresco means creating a new child-association instance between the parent folder where you want that the content will be visible and the content itself.
The unique difference with the primary parent is that removing the primary will remove in cascade all its children associated with it as primary parent.
You could use the same cm:contains child-association definition included in the Alfresco content model or you could create a brand new child-association, for Share it is the same because you will see any child association visible as a content included in the space.
For enabling Share to change all the secondary parents you should make visible the cm:contains association inside the edit form of your folder type (that could be the default cm:folder).
Or you can simply use the JavaScript API using a similar ECMAScript code:
var querySecondaryParent = "PATH:\"/app:company_home/st:Sites/cm:YourSite/cm:documentLibrary/cm:TheSecondaryParentFolder\""; var queryChildContentToAdd = "PATH:\"/app:company_home/childToAdd.txt\"";
var parentFolder = search.luceneSearch(querySecondaryParent); var childContent = search.luceneSearch(queryChildContentToAdd); parentFolder.addNode(childContent);
Hope this helps
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.