cancel
Showing results for 
Search instead for 
Did you mean: 

Shortcut or link from one space to another space?

atomical
Champ in-the-making
Champ in-the-making
Hi!

I want to create links from one document in alfresco to another space in alfresco - because I don't want to upload the same document more than one times.
My (sub-sub-sub)-spaces representing one project each, and if I need e.g. the same manual for more projects I need to create a link to the once uploaded document. If I move or edit the original document, the links should be regenerated automatically.

I didn't found something like this in the hosted trial or in the documentation.


I hope, my English is understandable Smiley Happy

Greetings from Germany

atomical
14 REPLIES 14

ds-crcpress
Champ in-the-making
Champ in-the-making
Usually next to a content item, there is an icon that you can click for cutting and copying.  Click the copy link.  On the left side bar, there is a link that allows you to view your 'Shelf'.  This is just like the Windows clipboard.  Navigate to the space where you want to put a link to the item on the clipboard.  Then click the icon for paste link (on the shelf next to the item you copied is a clipboard with a chainlink).  This will put a link into the content space your in to the item you copied to your clipboard.

Hope that helps!

-David

atomical
Champ in-the-making
Champ in-the-making
That's it  Smiley Very Happy

Thank you!

robain
Champ in-the-making
Champ in-the-making
How about doing this using the java API. is this possible? where do i look for that

raju_myadam
Champ in-the-making
Champ in-the-making
Hello,
We have a similar requirement in our project. Could you please let me know if you resolved this issue?

Thanks in advance.

Regards,
Raju

robain
Champ in-the-making
Champ in-the-making
Here is the code that I used. just use the space name that you want and the change the <actual-scape> to return the space to which you want to link to. hope this helps.
   
            String spaceName = "Space";
          String qname = QName.createValidLocalName(spaceName);
         
          Map<QName, Serializable> dProps = new HashMap<QName, Serializable>(3);
          dProps.put(ContentModel.PROP_NAME, spaceName);
          dProps.put(ContentModel.PROP_LINK_DESTINATION, <actual-space>);
         
          ChildAssociationRef assocRef = this.nodeService.createNode(
               homeSpaceRef,
               ContentModel.ASSOC_CONTAINS,
                QName.createQName(NamespaceService.SYSTEM_MODEL_1_0_URI, qname),
                ApplicationModel.TYPE_FOLDERLINK,
                dProps);
        
         NodeRef nodeRef = assocRef.getChildRef();
        
         // set the name property on the node
         this.nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, spaceName);
        
         if (logger.isDebugEnabled()) logger.debug("Created Space link with name: " + spaceName);
        
         Map<QName, Serializable> props = new HashMap<QName, Serializable>(3);
         props.put(ApplicationModel.PROP_ICON, CreateSpaceWizard.DEFAULT_SPACE_ICON_NAME);
         props.put(ContentModel.PROP_TITLE, spaceName);
         props.put(ContentModel.PROP_DESCRIPTION, spaceName);
         this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, props);

raju_myadam
Champ in-the-making
Champ in-the-making
Thank you.

thestorm
Champ in-the-making
Champ in-the-making
//no need for document links, better structure of Spaces makes this useless

itsard
Champ in-the-making
Champ in-the-making
Hi,
The above code snippet seems to be of repository.jar classes. I am using alfresco-webservice-client.jar and those classes are not available in it.
Can you please let me know how do i directly call the repository.jar classes from my code.I have my EAR and alfresco.war deployed in the same application server.
Thanks & Regards,

robain
Champ in-the-making
Champ in-the-making
itsard,
the code is for alfresco extensions which is deployed as an extension of alfresco server itself and not a client code of some sort.

Thanks