The 5.7 branch of Magnolia reached End-of-Life on December 31, 2023, as specified in our End-of-life policy. This means the 5.7 branch is no longer maintained or supported. Please upgrade to the latest Magnolia release. By upgrading, you will get the latest release of Magnolia featuring significant improvements to the author and developer experience. For a successful upgrade, please consult our Magnolia 6.2 documentation. If you need help, please contact info@magnolia-cms.com.
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:
- FreeMarker manual
- FreeMarker quick start guide to templating
- FreeMarker built-ins are the
?
bits that follow expressions and provide useful functionality. - FreeMarker directives are the
[#blocks]
of code which are similar to JSP tags.
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.