Override "item.lib.ftl" file

cancel
Showing results for 
Search instead for 
Did you mean: 
ValentinLeblanc
Active Member

Override "item.lib.ftl" file

Jump to solution

Hello,

I would like to override the file "item.lib.ftl" which is located in share :  alfresco-share-services/src/main/resources/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2 

 

Is it possible ? How could I do this ? 

 

Thank you

1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: Override "item.lib.ftl" file

Jump to solution

I guess that, from an extension point, you should create two modules:

* One module in Share to change the invocation to http://127.0.0.1:8080/alfresco/s/slingshot/doclib2/node/workspace/SpacesStore/XXX to a custom WebScript (i.e. http://127.0.0.1:8080/alfresco/s/slingshot/doclib2/node-custom/workspace/SpacesStore/XXX)

* One module in Repo to implement that new "node-custom" WebScript (including the item.lib.ftl modifications)

I don't see any other approach to get that done.

Hyland Developer Evangelist

View solution in original post

5 Replies
angelborroy
Alfresco Employee

Re: Override "item.lib.ftl" file

Jump to solution

If you're using the Alfresco Maven SDK to create a JAR/AMP, you can create that file in "/src/main/resources/alfresco/extension/templates/webscripts/alfresco/slingshot/documentlibrary-v2/item.lib.ftl". This is a Repository extension.

Hyland Developer Evangelist
angelborroy
Alfresco Employee

Re: Override "item.lib.ftl" file

Jump to solution

That may not work, since this WebScript is included as an additional AMP in Share Services module:

https://github.com/Alfresco/alfresco-community-repo/tree/master/amps/share-services

I guess you'll need to use a different approach.

Hyland Developer Evangelist
ValentinLeblanc
Active Member

Re: Override "item.lib.ftl" file

Jump to solution

Thank you for the quick answer.

 

Unfortunately, it appears to be not working (or I did it wrong): the same old "item.lib.ftl" from share is used by the system. (I did the test by calling "alfresco/s/slingshot/doclib2/node/workspace/SpacesStore/XXXXX" and check the JSON result).

 

My file is located in the JAR : alfresco/extension/templates/webscripts/alfresco/slingshot/documentlibrary-v2/item.lib.ftl

 

Is there any configuration xml file to modify/add or just creating the new file in this location should be enough ?

 

 

EDIT : Ok I didn't see your second reply. Thank you for information

Thank you

angelborroy
Alfresco Employee

Re: Override "item.lib.ftl" file

Jump to solution

I guess that, from an extension point, you should create two modules:

* One module in Share to change the invocation to http://127.0.0.1:8080/alfresco/s/slingshot/doclib2/node/workspace/SpacesStore/XXX to a custom WebScript (i.e. http://127.0.0.1:8080/alfresco/s/slingshot/doclib2/node-custom/workspace/SpacesStore/XXX)

* One module in Repo to implement that new "node-custom" WebScript (including the item.lib.ftl modifications)

I don't see any other approach to get that done.

Hyland Developer Evangelist
ValentinLeblanc
Active Member

Re: Override "item.lib.ftl" file

Jump to solution

okay, thanks for this, i will try it this way.