How to extend alfresco-template.ftl

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

How to extend alfresco-template.ftl

I need to add SiteAdmin authentication and hence need to extend the alfresco-template.ftl file. It is present in target/share-war/WEB-INF/classes/alfresco/templates/org/alfresco/include/alfresco-template.ftl . How to extend it. Below is the code snip where I want to add authentication for site-admin. 


<#if page?? && (page.authentication="user" || page.authentication="admin")>
Alfresco.util.Ajax.jsonGet({
url: Alfresco.constants.URL_CONTEXT + "service/modules/authenticated?noCache=" + new Date().getTime() + "&a=${page.authentication?html}"
});

1 Reply
sanjaybandhniya
Intermediate

Re: How to extend alfresco-template.ftl

You can try extension module to override existing resources.

https://docs.alfresco.com/5.1/concepts/dev-extensions-share-surf-extension-modules.html

https://docs.alfresco.com/4.2/tasks/dev-extensions-share-tutorials-fm-temp-customize.html

 

Ex.

 

<extension>
	<modules>
		<module>
			<id>FTL</id>
			<version>1.0</version>
			<auto-deploy>true</auto-deploy>
			<customizations>
				<customization>
			<targetPackageRoot>org.alfresco.include</targetPackageRoot>
			<sourcePackageRoot>pk.alfresco</sourcePackageRoot>
				</customization>
			</customizations>
		</module>
	</modules>
</extension>