Creating a FreeMarker template
Now that we understand the syntax and structure of a FreeMarker template, in this recipe, you will learn how to create a basic FreeMarker template.
How to do it...
1. Open the Alfresco web client and navigate to the Company Home > Data Dictionary > Presentation Templates space. Just like the Company Home > Data Dictionary > Scripts space contains all the executable scripts in the repository, similarly the Presentation Templates space holds all the FreeMarker templates that can be used in custom presentations of various contents in the repository.
2. You can see a number of sample FTL files (
ftl
is the standard extension of FreeMarker template files) are stored in this folder. Each of the FTL files are standard text files.3. Thus you need to create FTL files in this space and Alfresco will use these templates in custom presentations.
4. In the Company Home > Data Dictionary > Presentation Templates space, create a new content. Let's name it space_details...