Templates to Create Pages that are Editable with the Universal Editor page-templates
Learn how to create templates that can be used to create pages that are editable with the Universal Editor, saving time and ensuring consistent branding.
What are Page Templates? what-are
Branding and marketing guidelines often dictate particular layouts for your content pages. It is also often a practical reality that many of your pages will share the same structure and layout. To save your content authors time, pages can be created from templates.
Page templates serve as master copies of your page layouts. When you create a page from a template, the initial content of the template is copied to the new page, helping to predefine the basic layout and content of the page for the content author, saving them time.
Enabling Page Templates enabling-templates
In order to use templates to creating pages that are editable with the Universal Editor, you must enable the option.
First enable editable templates for your site’s configuration.
- Use the Sites console and select the root of your site.
- Once the site root is selected, tap or click the Properties icon in the toolbar.
- On the Advanced tab of the properties dialog take note of the value in the Cloud Configuration field.
- From the main navigation, choose Tools -> General -> Configuration Browser.
- In the Configuration Browser, select the configuration you noted in the previous step and tap or click Properties in the toolbar.
- In the Configuration Properties window, check the option Editable Templates.
- Tap or click Save & Close.
Once the configuration is enabled, you must allow templates for your site.
- Use the Sites console and select the root of your site.
- Once the site root is selected, tap or click the Properties icon in the toolbar.
- On the Advanced tab of the properties dialog under the Template Settings section, tap or click the Add button.
- In the new, empty field that appears under Allowed Templates, add the path
/conf/<site>/settings/wcm/templates/.*
. - Tap or click Save & Close.
You can now use templates to create pages for your site. This task must only be done once every site/configuration where you wish to use templates when creating pages that are editable with the Universal Editor.
Creating a New Template create-new
You can either create a new page to serve as a template or use an existing page as the base of a template.
-
Use the Sites console to navigate to the new or existing page that you wish to use as a template and tap or click it to select it.
-
Once the page is selected, tap or click the Properties icon in the toolbar.
-
On the Advanced tab of the properties dialog under the Template Settings section, select the toggle Use Page as Template.
-
Tap or click Save & Close.
Your new page can now be used as a template when creating new pages.
Creating a Page from a Template creating-from-template
Creating a page from a template that is editable with the Universal Editor is the same workflow as creating any other page.
-
Use the Sites console to navigate to the location where you wish to create the new page.
-
Tap or click Create -> Page.
-
On the Template tab of the Create Page wizard, you can select on which template you wish to base your new page. Tap or click the desired template to select it and then tap or click Next.
Complete the wizard as you would for any other page and you have created your new page based on the selected template.
Pages and Templates pages-vs-templates
Page templates only define the initial content of pages. Pages are then entirely editable with the Universal Editor.
- Pages created from pages templates are independent copies of the template.
- If the template changes, the existing pages based on that template do not change.
- The content author can modify and update the content of the resulting page as necessary with no restrictions from the template.
Editable Templates editable-templates
Pages created with the Page Editor can also be based on templates. Templates used to create pages for the Universal Editor and the Page Editor both leverage AEM’s editable templates.
Templates used to create pages editable with the Page Editor make use of all features of editable templates. Templates usd to create pages editable with the Universal Editor only use the initial content feature.