Thank you for your thoughts and suggestions on this.
So overriding via web-extension would allow to replace the template without touching the source file - great! I could add a switch and include the ootb template.
Is there a way to combine this with the extensibility mechanism, so that it would only be active based e.g. on the site name? All other sites would then still use the ootb template.
Another idea would be to remove all regions on the document-details using the extensibility mechanism with <@region action="remove"> and to replace/extend the last region of that document-details (custom-doclib) with the new template layout. But I am not sure if the before-removed-regions will be available…
All a litte complicated as I just would like to change the structure and placement of the regions on the page, not the region contents itself.
Is this kind of customization on the extensinibilty mechanism roadmap? Maybe something like
<template-customizations>
<template-customization>
<targetPackageRoot>org.alfresco</targetPackageRoot>
<sourcePackageRoot>org.acme.templates</sourcePackageRoot>
</template-customization>
</template-customizations>
which would mean that this will replace the template org.alfresco.document-details.ftl with org.acme.templates.document-details.ftl.
Regards,
lothar