Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.

A template script defines the output, typically HTML, and is interpreted by a Renderer. The script is written in a templating language such as FreeMarker or JSP.

A template script is a mixture of:

  • Static markup
  • Dynamically assigned values provided by TemplatingFunctions and other convenience helpers
  • Content references

FreeMarker

At Magnolia, we prefer FreeMarker for its flexibility, clean syntax and practical error reporting.

You can use the .version special variable in a template to check the FreeMarker version in your Magnolia.

If you are not familiar with FreeMarker, these links will get you started:

For further information about how to use Freemarker in the Magnolia context, also read:

The Magnolia CLI offers the create-page and create-component commands that automatically create basic scripts, template definitions and dialog definitions.