Page Templates transform the XML provided to a page by its data sources.
Page templates are automatically generated whenever a page is created. They can be edited either using the page template editor in the admin interface or by editing the XSLT stylesheet file directly.
In the admin interface, the page template editor can be accessed by clicking the template’s file name in the “Templates” column of the Pages index view (
Blueprints > Pages), or directly from the corresponding page’s edit form (by clicking the blue “Edit Template” button).
Page templates must be well-formed XSLT stylesheets.
Page Template Editor
The page template editor is fairly basic. It consists of a single, large text area containing the whole of the XSLT stylesheet. On the right side of the editor is a list of all utilities in a project. Any utilities included in the current stylesheet are highlighted (when the xsl:include tag is first added, the text area must lose focus before the highlighting will apply).
The Big Picture
Page templates can dynamically include utilities by calling them at the beginning of the stylesheet, before any xsl:templates are declared:
<xsl:include href="../utilities/utility-name.xsl" />