AnsweredAssumed Answered

Replace Page Template in Module

Question asked by meiko on Feb 19, 2014
Hi Alfresco Developers,

is it possible to replace a template-instance of an existing page in a module definition?

I want to replace the template of the folder-details page (/alfresco/site-data/pages/folder-details.xml) with my own.
The alfresco folder-details page uses the "folder-details" template-instance:

<template-instance>folder-details</template-instance>


Here is the module. Please notice the defined site.module.evaluator - i do not want to override the template globally.

/alfresco/site-data/extensions/my-share-extension.xml

<extension>
    <modules>
        <module>
            <id>my Site changes</id>
            <evaluator type="site.module.evaluator">
                <params>
                    <sites>.*</sites>
                    <sitePresets>my-preset</sitePresets>
                    <applyForNonSites>false</applyForNonSites>
                    <groups>.*</groups>
                </params>
            </evaluator>
        </module>
    </modules>


and here is the template i want to use for the folder-details page.
/alfresco/site-data/template-instance/my-folder-details

<template-instance>
   <template-type>org/alfresco/folder-details</template-type>
   <properties>
      <pageFamily>documentlibrary</pageFamily>
      <container>documentLibrary</container>
   </properties>
   <components>
        <component>
            <region-id>title</region-id>
            <url>/my/my-folder-details</url>
        </component>
    </components>
</template-instance>


I already know the component extensibility features: how to override/change single components. But i think replacing the whole template for pages inside a module would be much cleaner and easier to develop.

Outcomes