Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
Page is the highest level template. Pages are the building blocks of the site hierarchy visible in the site tree. Each part of the site URL is also a page. For example, demo-project.com/about/history
has three pages: a home page, about
section page, and a history
page. Pages consist of areas which can consist of further areas or components.
The STK ships with several page templates that match typical use cases:
Node name |
---|
modules |
standard-templating-kit |
templates |
pages |
stkArticle |
stkEvent |
stkEventsOverview |
stkFAQ |
stkForm |
stkFormStep |
stkGlossary |
stkGlossaryLetter |
stkGlossaryTerm |
stkHome |
etc. |
You can see what the page templates look like in the static HTML prototype (browse, download) and live demo sites.
You are not limited to the templates that ship with the STK. Create your own page types by mixing and matching layout, areas and components.
Page templates provided by other modules
Many Magnolia modules come with page templates. For example:
A page definition configures the properties of the page template. It is similar to the component definition in that both use the same template definition object:
ConfiguredTemplateDefinition
. Pages and components also reference their dialogs with the same path syntax and they are rendered using the same renderer. You can find page definitions in the <module name>/templates/pages
folder.
Property | Description | Valid values | Mandatory |
---|---|---|---|
| The |
| Yes |
| The | A valid Magnolia path. | Yes |
| Optional. The | The value has two parts. The first part before the colon (:) is the name of the module folder where the dialog definition resides. The second part is a relative path. Example: | No |
| Optional. Page description. Type a literal value or retrieve the value from a message bundle using a key. The message bundle is defined in the | No limitations. Conventional alphanumeric characters are recommended. Otherwise a properly defined key. | No |
| Optional. Message bundle used for the page. | Any properly defined message bundle. This value should match the message bundle set in the dialog definition. | No |
| Optional. Defines the concrete Java class to instantiate. For STK page templates the class is | Fully-qualified class name. This property needs to be in appropriate Magnolia class syntax. | No |
| Optional. A Java class that contains business logic for the page. The model class needs to implement the
RenderingModel
interface. The renderer creates a bean based on the | Fully-qualified class name. This property needs to be in appropriate Magnolia class syntax and specifically refer to the | No |
| Optional. Title of the page. You can type a literal value or retrieve the value from a message bundle using a key. The message bundle is defined in the | If typed, no limitations. Conventional alphanumeric characters are recommended. Otherwise a properly defined key. | No |
| Optional. The |
| No |
| Optional. Assigns the page to a category such as |
| No |
| Optional. Makes the page template available to editors. |
| No |
| Optional. Inherits the configuration from another page definition. See Extending configuration . | A valid Magnolia path. | No |
In the page definition skeleton below, mandatory properties are red while optional properties are black.
Node name | Value |
---|---|
<page template name> | |
areas | |
category | <category name> |
class | <fully qualified template definition class> |
description | <description> |
dialog | <module>:<path> |
extends | <path to source configuration> |
i18nBasename | <message bundle> |
modelClass | <fully qualified class name> |
bodyID | <ID of the HTML body element> |
renderType | <stk | freemarker | jsp> |
subcategory | <subcategory name> |
title | <page template title> |
templateScript | <module name>:<path to script> |
visible | <true | false> |
Read more about pages in the My first template tutorial.