Add Custom Action Button

cancel
Showing results for 
Search instead for 
Did you mean: 
sakshik
Established Member

Add Custom Action Button

Jump to solution

To add a custom action link in Documents Actions[ where Copy To, Move To etc are present], I am adding

<div>
<a rel='' href='#' class='action-link' title='${msg('actions.document.backup')}'>
${msg('actions.document.backup')}</a>
</div>

in ...\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\documentlist.get.html.ftl

and

<actionSet id = 'document'>
<action type="action-link" id="onActionBackup" label="actions.document.backup" />
</actionSet>

in WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\repo-toolbar.get.config.xml

and

actions.document.backup=Backup
message.backup.success='{0}' successfully backed up.
message.backup.failure=Couldn't backup '{0}

in \WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\documentlist.get.properties

But I am not able to see the new link come up in Document Actions.

Is there anything that I am missing?

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: Add Custom Action Button

Jump to solution

In order to create a new Action, there is no need to deal with the HTML part.

All you have to do is to perform the steps in the tutorial shared before.

The action rendering will be handled for you by Share.

View solution in original post

5 Replies
tim1234
Active Member

Re: Add Custom Action Button

Jump to solution

I recommend reading this tutorial by Jeff:
Creating Custom Actions in Alfresco | ECMArchitect | Alfresco Developer Tutorials 
Hope it helps.

sakshik
Established Member

Re: Add Custom Action Button

Jump to solution

Hi Tim,

Thank you for the reply. I have gone through this tutorial. 

My requirement is very simple. I just want to create a link[ say, "Publish"] that would move the actioned Upon NodeRef to a destination decided by me. Following this tutorial is getting a little overwhelming as I am really new to alfresco.

I'll be happy to get some hints for my requirement

tim1234
Active Member

Re: Add Custom Action Button

Jump to solution

I am new too so be careful when taking my words:
Assume you have setup your custom actions correctly, a reason of not showing up could be you have not configure it in share-config-custom.xml to decide whether it shows up in UI.

please read the part 

3. Update the share-config-custom.xml file to show a document library indicator

of Jeff's tutorial

Tim

sakshik
Established Member

Re: Add Custom Action Button

Jump to solution

okay thanks!

douglascrp
Advanced II

Re: Add Custom Action Button

Jump to solution

In order to create a new Action, there is no need to deal with the HTML part.

All you have to do is to perform the steps in the tutorial shared before.

The action rendering will be handled for you by Share.