Wiki source code of Create a Page Template

Last modified by Eleni Cojocariu on 2026/10/13 17:57

Hide last authors
Eleni Cojocariu 9.1 1 To offer your users a [[Page Template>>doc:documentation.xs.admin.page-templates.WebHome]], create the page that serves as the template, then the template provider that puts it in the creation wizard.
2
3 1. Create the page you want to use as a template: open the creation wizard, enter a title, and keep the "Blank page" type under "Default". To turn a page you already have into a template instead, go straight to step 4.(((
4 {{image reference="creation-wizard-type-field.png" size="extra" alt="The creation wizard with the title Project Brief Template entered and the Blank page type selected under Default"/}}
5 )))
6 1. Write the content that every page created from this template should start with, then save.(((
7 {{image reference="template-page-content.png" size="extra" alt="The Project Brief Template page in the editor, with Goal, Scope, Milestones and Owner headings"/}}
8 )))
9 1. If the pages made from this template need [[structured data>>doc:documentation.xs.dev.data-model.x-objects.WebHome]], add the objects to the template page in object mode: they are copied along with the content. An object that brings its own sheet also changes how the template page itself looks in view mode.(((
10 {{image reference="template-page-saved.png" size="extra" alt="The saved Project Brief Template page in view mode"/}}
11 )))
12 1. Open "Administration", then "Page Templates" in the "Content" category. The section lists the template providers that already exist and offers a form to create one.(((
13 {{image reference="templates-admin-section.png" size="extra" alt="The Page Templates administration section, with the Create a Template Provider form and the list of Available Template Providers"/}}
14 )))
15 1. Under "Create a Template Provider", enter a title, choose where to store the provider, and click "Create". Naming the provider after its template keeps the two easy to pair.
16 1. Fill in the provider form. Enter a "Template Name" for your users to pick in the wizard, and set "Template to use" to the page from step 2. The [[other fields>>doc:documentation.xs.admin.page-templates.template-provider-fields.WebHome]] decide where the template is offered and what the Create button does.(((
17 {{image reference="template-provider-form.png" size="extra" alt="The template provider form filled in for the Project Brief template, showing the Provider Name, Template Name, Description, Icon, location, Template to use, Creation Restrictions, Terminal Page and Action on create fields"/}}
18 )))
19 1. Restrict where the template applies, unless it should be offered everywhere. Click "+" under "List of locations where the template must be available", then under "Creation Restrictions", and pick the locations in the page tree. The wizard then refuses a location a creation restriction forbids.(((
20 {{image reference="creation-restriction-denied.png" size="extra" alt="The creation wizard refusing the parent Main for the Project Brief template, with the message Allowed space for Project Brief"/}}
21 )))
22 1. Create a page from one of the allowed locations. Your template is now listed under "Templates" in the wizard, under the name and description you gave the provider.(((
23 {{image reference="template-offered-wizard.png" size="extra" alt="The creation wizard opened under Projects, with Project Brief listed first in the Templates group"/}}
24 )))

Get Connected