Template scripts

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

In the context of developing single-page applications, the elements comparable to FreeMarker template scripts are components. These are compiled into a single HTML page. On the Magnolia side, page rendering is handled by the SPA renderer.

A template script is a mixture of:

  • Static markup

  • Dynamically assigned values provided by TemplatingFunctions and other convenience helpers

  • Content references


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

Magnolia 6.3.0 includes FreeMarker version 2.3.32. You can use the .version special variable in a template to check this.

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

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


DX Core



This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules
6.3 beta

Magnolia 6.3 beta

Magnolia 6.3 is in beta. We are updating docs based on development and feedback. Consider the 6.3 docs currently in a state of progress and not final.

We are working on some 6.3-beta known issues during this phase.