Templates are blueprints for creating pages, areas and components. When you add a page in the Pages app you must choose a template.

A template consist of:

Template definition


A template definition gives a template a name and makes it available to the system. At a minimum a template definition must specify a script and a renderer.

Template script


A template script defines the output, typically HTML, and is interpreted by a 

$webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") Renderer
. The script is written in a templating language such as FreeMarker or JSP.

Dialog definition


Dialogs are used for content entry. A dialog defines the editable content properties of a template. Pages, area and component templates can all use dialogs.



The model is a JavaBean implementing

$webResourceManager.requireResource("info.magnolia.sys.confluence.artifact-info-plugin:javadoc-resource-macro-resources") RenderingModel
. Use it to implement complex logic. The model can execute any Java code to retrieve data from the repository or from an external source. The results are available to the template script for rendering on the page.

Elements of the Magnolia template mechanism:

(warning) The diagram abbreviates the field class as i.m.u.f.f.d.TextFieldDefinition to save space. This is not a valid value. Use fully-qualified field class names such as info.magnolia.ui.form.field.TextFieldDefinition in your definitions.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))