cancel
Showing results for 
Search instead for 
Did you mean: 

Not overwrite alfresco code in Share extensions.

isloat
Champ in-the-making
Champ in-the-making
I have done the "Custom Document Library Action" example (Backup Example) :  http://wiki.alfresco.com/wiki/Custom_Document_Library_Action#Creating_a_New_Action

But, is any way to separate the new code from the alfresco files?  Because every guide & book recommend to not overwrite alfresco code.

I'm using 3.4a Smiley Wink

Thanks!
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
It's tricky currently but will become much easier with the "Swift" release later this year. For some hints for the 3.4 codebase, please see http://www.slideshare.net/alfresco/apps-2-customizingthedocumentlibrary

Thanks,
Mike

isloat
Champ in-the-making
Champ in-the-making
So, right now, I CAN'T have my extensions of documentlist.get.properties, documentlist.get.head.ftl and documentlist.get.config.xml in 3 new files with these names under tomcat/shared/classes/alfresco/web-extension to overwrite them, can I ?

Are you going to change the architecture or just an improvement? Will be the new release compatible with 3.4 extensions?

Thanks a lot!

isloat
Champ in-the-making
Champ in-the-making
I have found a way following your link. Thanks!
I have copy and paste these 3 files under shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary, and it works! These files replace original ones!

But I don't want to replace all the file (I don't want to have alfresco code in these extensions files), I only want to extend them.
Do you know how to write only the extended part?

For example in documentlist.get.config.xml, I want to look like this:

<documentList>
   <actionSets>
      <actionSet id="document">      
         <action type="action-link" id="onActionNewAction" label="actions.document.newaction" />
      </actionSet>
   </actionSets>
</documentList>

Only the extension not all the file. Do you know how?

mikeh
Star Contributor
Star Contributor
There isn't a way with 3.4 - you have to override the whole file.

Project Swift introduces a completely new action config framework as well as Share extension points. You'll be able to add your new action via share-config-custom.xml instead of overriding webscripts in the web-extension folder.

You can read about the Share extension parts here: http://blogs.alfresco.com/wp/ddraper/

Thanks,
Mike
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.