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
Solved! Go 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.
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.
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.
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
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.
okay, thanks for this, i will try it this way.
Add-ons is the place to find extensions, Alfresco customizations and related projects for your installation.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.