When creating a page you need to select a template; this will be used as the basis for creating the new page. The template defines the structure of the resultant page, any initial content and the components that can be used (design properties).
With the template editor, creating and maintaining templates is no longer a developer-only task. A power-author can be involved too. Developers are still required to setup the environment, create client libraries and create the components to be used, but once these basics are in place the author has the flexibility to create and configure templates without a development project or iteration.
The template console allows your (template) authors to:
- Create a new template (either new or by copying an existing template).
- Manage the lifecycle of the template.
The template editor allows your (template) authors to:
- Add (available) components to the template and position them on a responsive grid.
- Pre-configure the components.
- Define which components can be edited on the resultant pages (created from the template).
경고:
The Templates console and editor are only available with the touch-optimized UI. Pages and templates created with the Templates console are not meant to be used with the classic UI and such use is not supported.
참고:
Although not identical, adding components and assets to a template has many similiarities to comparable actions when page authoring.
The following points are important before you start:
- Creating a new template requires collaboration, for this reasone the Role is indicated for each task.
- Depending on how your instance is configured it might be useful to be aware that AEM now provides two basic types of template. This does not impact how you actually use a template to create a page, but it does impact the type of template you can create and how a resultant page relates to its template.
- Using a Template to Create a Page
Creating a new template (using the Templates console and the template editor) requires collaboration between:
- Admin:
- Creating a new folder for templates requires admin rights.
- Creating a new folder for templates requires admin rights.
- Developer:
- Concentrate on the technical/internal details; need experience of the development environment.
- Provide the template author with some required information.
- Concentrate on the technical/internal details; need experience of the development environment.
- Template Author:
- Specific authors that are members of the group:
template-authors
This allocates the required privileges and permissions.
- Can configure the use of components and other high level details. Needs:
- Experience of some technical details; for example, using patterns when defining paths.
- Technical information - from the developer.
- Specific authors that are members of the group:
Due to the nature of some tasks (such as creating a folder) a development environment is needed, and this requires knowledge/experience.
-
- Can be created and edited by your authors using the Template console and editor. The Template console is accessible in the General section of the Tools console (only available in the touch-optimized UI).
- After the new page is created a dynamic connection is maintained between the page and the template; this means that changes to the template structure and/or locked content will be reflected on any pages created with that template. Changes to the unlocked (i.e. initial) content will not be reflected.
- Uses content policies (you can define these from the template editor) to persist the design properties (does not use Design mode within the page editor).
- Can be created and edited by your authors using the Template console and editor. The Template console is accessible in the General section of the Tools console (only available in the touch-optimized UI).
-
Static Templates
- These templates have been available for several versions of AEM.
- They are provided by your developers, so cannot be created or edited by authors.
- Are copied to create the new page, no dynamic connection exists after this (though the template name is registered for information).
- Use Design Mode to persist design properties.
- These templates have been available for several versions of AEM.
When using a template to create a new page there is no visible difference and no indication of the type of template being used.
When creating a new editable template you:
- use the Template console; this is available in the General section of the Tools console (in the touch-optimized UI only).
- or directly; for example at: http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf
- can create a folder for the templates (if necessary)
- create a new template (empty at this stage)
- define additional properties for the template (if required)
- edit the template to define the:
- Structure: predefined content that cannot be changed on resultant pages.
- Initial Content: predefined content that can be changed on resultant pages.
- Layouting: for a range of devices.
- Structure: predefined content that cannot be changed on resultant pages.
- then enable the template for use when creating a page
- and allow the template for the required page or branch of your website
- before publishing the template to make it available on the publish environment (needed because of the dynamic connections with the pages).
참고:
The Allowed Templates are often pre-defined when your website is initially set up.
경고:
The template console and editor are only available with the touch-optimized UI.
In a standard AEM instance the global folder already exists in the template console. This holds default templates and acts as a fallback if no policies and/or template-types are found in the current folder. You can add your default templates to this folder, or create a new folder to hold your customized templates; for example, site and/or language specific templates.
When creating folders within the template console, you will want to define the following properties:
- Title
A title for the folder, that will be shown in the console.
- Name
The folder name, used in the URL.
Template types and policies are inherited across all folders according to the following order of precedence:
- The current folder.
- Parent(s) of the current folder.
- /conf/global
- /apps
- /libs
A list of all allowed entries is created. If any configurations overlap (path/label), only the instance closest to the current folder is presented to the user.
-
In addition to the standard authoring permissions and privileges (e.g. content-authors) you now need to assign group(s) and define the required access rights (ACLs) for your authors to be able to create templates in the new folder. See Access Right Management for full details.
The template-authors group is the default group that needs to be assigned.
Path Role / Group Permissions - Author Environment
Permissions - Publish Environment
Description /conf/<your-folder>/settings/wcm/templates template-authors
read, write, replicate read, write, replicate In a standard installation the template-authors group is empty. /conf/<your-folder>/settings/wcm/policies everyone read read 경고:
The template-authors group is only for users that must be able to create new templates.
Editing templates is very powerful and if not done properly exiting templates can be broken. Therefore this role should be focused and only include qualified users.
-
Select Create. A confirmation will be shown, select Open to start editing the template or Done to return to the template console.
참고:
When a new template is created it is marked as Draft in the console, this indicates that it is not yet enabled.
- Details
- Image
- You can upload an image to be used as a thumbnail for template selection; for example, in the Create Page wizard.
- You can upload an image to be used as a thumbnail for template selection; for example, in the Create Page wizard.
- Title
- A title, used for identifying the template; for example, in the Create Page wizard.
- Description
- An (optional) description to provide more information about the template and its use; for example, in the Create Page wizard.
- An (optional) description to provide more information about the template and its use; for example, in the Create Page wizard.
- Image
경고:
Once a template is enabled a warning will be displayed when an author starts to update the template further. This is to inform the user that the template might be referenced, so any changes might affect the pages referencing the template.
참고:
You can Disable a template in a similar manner.
-
You can now use your template when Creating a New Page, though you will probably want to edit the template according to your requirements.
참고:
Often the allowed templates are pre-defined for your entire site when it is set up.
-
Open the Page Properties for the root page of the branch where you want the template to be available.
-
Under Template Settings use Add field to specify the path(s) to your template(s).
The path can be explicit or use patterns; for example:
/conf/<your-folder>/settings/wcm/templates/.*
The order of the paths is irrelevant, all paths will be scanned and any templates retrieved.
참고:
If the Allowed Templates list is left empty then the tree will be ascended until a value/list is found.
See Template Availability for Static Templates - the principles for allowed templates remain the same.
참고:
This is often defined when the website is setup. The path will probably be supplied by the developer.
As the template is referenced when a page is rendered, the (fully configured) template needs to be published so that it is available on the publish environment.
-
Components added here cannot be moved/removed from resultant pages by the page authors. If you want page authors to be able to add and remove components to resultant pages, then you need to add a paragraph system to the template.
When components are locked you can add content, this cannot be edited by page authors. You can unlock components to allow you to define Initial Content.
참고:
In structure mode, any components that are the parent of an unlocked component cannot be moved, cut or deleted.
-
When a component has been unlocked you can define the initial content that will be copied to the resultant page(s), created from the template. These unlocked components can be edited on the resultant page(s).
참고:
In initial content mode (and on the resultant pages), any components (unlocked) that have an accessible parent (e.g. components within a layout container) can be deleted.
The Mode selector in the toolbar allows you to select and edit the appropriate aspect of the template:

While the Page Policy option on the Page Information menu allows you to select the required page policies:

경고:
If an author starts to edit a template that has already been enabled a warning will be displayed. This is to inform the user that the template might be referenced, so any changes might affect the pages referencing the template.
In Structure mode you define components and content for your template:
- Components defined in the template structure cannot be moved on, nor deleted from, any resultant pages.
- If you want page authors to be able to add and remove components add a paragraph system to the template.
- Components can be unlocked (and locked again) to allow you to define Initial Content.

참고:
Although not identical, adding components and assets to a template has many similiarities to similar actions when page authoring.
-
Add components
There are several mechanisms for adding components to the template:
- From the Components browser in the side panel.
- By using the Insert Component option (+ icon) available on the toolbar of components already on the template or the Drag components here box.
- By dragging an asset (from the Assets browser in the side panel) directly onto the template to generate the appropriate component in situ.
Once added, each component is marked with:
- a border
- a marker to show the component type
- a marker to show when the component has been unlocked
참고:
When you add a (out-of-the-box) Title component to the template it will contain the default text structure.
If you change this, and add your own text, then this updated text will be used when a page is created from the template.
If you leave the default text (structure) then the title will default to the name of the subsequent page.
-
Content Policy and Design Details
Create a content policy, or select an existing one, for a component. This allows you to define the design details:
참고:
This is compulsory for container components as it enables you to define components that will be available in the container.
Once you have created or selected a policy the design icon becomes visible, allowing you to edit the design details held within the policy:
The design details are specific to the component type; for example, for an Image they are composed of the width and height for both the minimal and maximal sizes, whereas for a Layout Container, you can define the list of components allowed within the container.
참고:
The design details are equivalent to the design dialogs accessible to page authors when using Design Mode.
-
Unlock/Lock components
You unlock/lock components to define whether the content is available for change in Initial Content mode.
When a component has been unlocked:
- An open padlock indicator is shown in the border.
- The component toolbar will be adjusted accordingly.
- Any content already entered will no longer be shown in Structure mode (as it constitutes Initial Content it is only visible there).
- The parents of the unlocked component cannot be moved, cut or deleted.
This includes unlocking container components so that further components can be added, either in Initial Content mode or on resultant pages. If you have already added components/content to the container before unlocking it, then these will no longer be shown when in Structure mode (they will be shown in Initial Content mode), only the container component itself will be shown, together with its list of Allowed Components:
Initial Content mode is used to defined content that will appear when a resultant page is first created, it can then be edited by page authors.
Although all content created in Structure mode is visible in Initial Content, only components that have been unlocked can be selected and edited.
-
If a container component has been unlocked (in Structure mode) then you can add new components to the container (in Initial Content mode). Components added in Initial Content mode can be moved on or deleted from resultant pages.
You can add component using either the Drag components here area, or the Insert New Component option from the toolbar of the appropriate container:
You can define the template layout for a range of devices. Responsive layouting for templates operates as it does for page authoring.
참고:
Changes to the layout will be reflected in Initial Content mode, but no change is seen in Structure mode.

Using the Page Policy option (on the Page Information menu) you can apply a content policy to either the template or resultant pages. This defines the content policy for the main paragraph system on the page.
참고:
The template author actually specifies the page policy on the template, but they will need to get details of the appropriate client-side libraries from the developer.
Using the Page Design option (on the Page Information menu) you can define the required client-side libraries on the Page Design dialog. These client-side libraries include stylesheets and javascript scripts to be loaded with the template and resultant pages.
Using the Initial Page Properties option (on the Page Information menu) you can define the initial page properties to be used when creating resultant pages.
-
Here is a list of the different operations possible on templates, together with how they affect the resultant pages:
- Changes to the structure:
These are immediately applied to the resultant pages (publication of the changed template is still needed for visitors to see the changes). - Changes to content policies and design configurations:
These apply immediately to the resultant pages (publication of the changes is needed for visitors to see the changes). - Changes to the initial content:
These only apply to pages created after the changes to the template. - Changes to the layout:
Depending on whether the modified component is part of:- structure-only - applied immediately
- contain initial content - only on pages created after the change
- structure-only - applied immediately
Danger zone:
- Locking or unlocking components on enabled templates:
This can have side-effects, as existing pages can already be using it. Typically:- unlocking components (that were locked) will be missing on existing pages
- locking components (that were editable) will hide that content from being displayed on the pages
참고:
Therefore, AEM gives explicit warnings when changing the lock status of components on templates that are no longer drafts.
- Changes to the structure:
-
Creating your own folders for your site-specific templates.
-
Publish your templates from the Templates console.