cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Action to Copy Space URL to Clipboard

luminary_mb
Champ in-the-making
Champ in-the-making
Hi,

I understand that to copy a Space's URL to the Windows clipboard you need to go to the Details page of the space, right-click on 'Browse Page URL' and select Copy Shortcut (or Copy Link Location in Firefox). This would copy the Space's URL to the Windows clipboard so it can be pasted into an email as a link.

However I would like create a custom action so that a user can just simply click on an action icon in the list of actions available for the space, which would then copy the Space's URL to the Windows clipboard. Therefore not having to go to the Details page of a space each time and copying the URL via the 'Browse Page URL' link.

What is the easiest and best way to achieve this? I have got as far as adding an action icon to my list of actions for a space, and now I just need to wire this action to the process of copying a Space's URL to the Windows clipboard.

Any suggestions welcome,
Thanks.
2 REPLIES 2

luminary_mb
Champ in-the-making
Champ in-the-making
I've just been looking at the source code of the Space Details jsp page, and I have found a number of references to functions that make up the 'Browse Page URL' link. Such as:

-   =request.getContextPath()
-   #{DialogManager.bean.browseUrl}
-   #{msg.details_browse_bookmark}

Is there anything from here that I can re-use or reference in my custom action that I have created in web-client-config-custom.xml?

Thanks.