Şu sürüme ilişkin yardım içeriğini görüntülüyorsunuz:
- 6.5
- 6.4
- 6.3
- 6.2
- Eski Sürümler
When creating a page you must select a template, which 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.
With the Template Editor, creating and maintaining templates is no longer a developer-only task. A type of power-user, who is called a template 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 template author has the flexibility to create and configure templates without a development project.
The Templates Console allows template authors to:
- Create a new template or copy an existing template.
- Manage the lifecycle of the template.
The Template Editor allows template authors to:
- Add components to the template and position them on a responsive grid.
- Pre-configure the components.
- Define which components can be edited on pages created with the template.
This document explains how a template author can use the template console and editor to create and manage editable templates.
For detailed information about how editable templates work at a technical level, please see the developer document Page Templates - Editable for more information.
Not:
The Template Editor does not support targeting directly on the template level. Pages created based on an editable template can be targeted, but the templates themselves can not be.
Dikkat:
Pages and templates created with the Templates Console are not meant to be used with the classic UI and such use is not supported.
Not:
An administrator must configure a template folder in the Configurations Browser and apply proper permissions before a template author can create a template in that folder.
The following points are important to consider before you start:
- Creating a new template requires collaboration. For this reason 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 page relates to its template.
Creating a new template using the Templates Console and the Template Editor requires collaboration between the following roles:
- Admin:
- Creates a new folder for templates requires admin rights.
- Such tasks can often also be done by a developer
- Creates a new folder for templates requires admin rights.
- Developer:
- Concentrates on the technical/internal details
- Needs experience with the development environment.
- Provides the template author with necessary information.
- Template Author:
- This is a specific author who is member of the group template-authors
- This allocates the required privileges and permissions.
- This allocates the required privileges and permissions.
- Can configure the use of components and other high level details which requires:
- Some technical knowledge
- For example, using patterns when defining paths.
- Technical information from the developer.
- Some technical knowledge
- This is a specific author who is member of the group template-authors
Due to the nature of some tasks such as creating a folder, a development environment is needed, and this requires knowledge/experience.
The tasks detailed in this document are listed with the role responsible for carrying them out.
-
- Can be created and edited by template authors using the Template console and editor. The Template console is accessible in the General section of the Tools console.
- 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.
- Use content policies, which you can define these from the template editor, to persist the design properties. Design mode within the page editor is no longer used for editable templates.
- Can be created and edited by template authors using the Template console and editor. The Template console is accessible in the General section of the Tools console.
-
Static Templates
- Static templates have been available for several versions of AEM.
- They are provided by your developers, so they cannot be created or edited by authors.
- Are copied to create the new page, but no dynamic connection exists after this (though the template name is registered for information).
- Use Design Mode to persist design properties.
- Because editing static templates is the exclusive task of a developer, please see the developer document Page Templates - Static for more information.
- Static templates have been available for several versions of AEM.
By definition, the template console and template editor only allow creation and editing of editable templates. Therefore this document focuses exclusively on editable templates.
When using a template to create a new page there is no visible difference and no indication between static and editable templates. For the page author, the process is transparent.
When creating a new editable template you:
- Use the Template console. This is available in the General section of the Tools console.
- Can create a folder for the templates if necessary
- Create a new template, which will initially be empty
- Define additional properties for the template if required
- Edit the template to define the:
- Structure - Predefined content that cannot be changed on pages created with the template.
- Initial Content - Predefined content that can be changed on pages created with the template.
- Layout - For a range of devices.
- Structure - Predefined content that cannot be changed on pages created with the template.
- Enable the template for use when creating a page
- Allow the template for the required page or branch of your website
- Publish the template to make it available on the publish environment
Not:
The Allowed Templates are often pre-defined when your website is initially set up.
Dikkat:
Never enter any information that needs to be internationalized into a template.
A template folder should be created for your project to hold your project-specific templates. This is an admin task and is described in the document Page Templates - Editable.
-
Not:
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.
It is recommended best practice to use a template folder created for your project.
-
Not:
Template types are predefined template layouts and can be thought of as templates for a template. These are predefined by developers or the system administrator. More information can be found in the developer document Page Templates - Editable.
-
Select Create. A confirmation will be shown, select Open to start editing the template or Done to return to the template console.
Not:
When a new template is created it is marked as Draft in the console, this indicates that it is not yet available to use by page authors.
- Image
- Image to be used as a thumbnail of the template to aid selection such as in the Create Page wizard.
- Can be uploaded
- Can be generated based on the template content
- Image to be used as a thumbnail of the template to aid selection such as in the Create Page wizard.
- Title
- A title used for identifying the template such as in the Create Page wizard.
- Description
- An optional description to provide more information about the template and its use, which can be seein for example in the Create Page wizard.
Not:
The status of a template (draft, enabled, or disabled) is indicated in the console.
To be able to use a template when creating a page you need to:
- Enable the template to make it available for use when creating pages.
- Allow the template to specify the content branches where the template can be used.
A template can be enabled or disabled to make it available or unavailable in the Create Page wizard.
Dikkat:
Once a template is enabled a warning will be displayed when a template 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 now use your template when creating a new page, though you will probably want to edit the template according to your requirements.
Not:
The status of a template (draft, enabled, or disabled) is indicated in the console.
-
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.
Not:
If the Allowed Templates list is left empty then the tree will be ascended until a value/list is found.
See Template Availability - the principles for allowed templates remain the same.
Not:
Often the allowed templates are pre-defined for your entire site when it is set up.
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.
When creating or editing a template there are various aspects that you can define. Editing templates is similar to page authoring.
-
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, which cannot be edited by page authors. You can unlock components to allow you to define Initial Content.
Not:
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 resulting page(s).
Not:
In Initial Content mode as well as on the resultant pages, any unlocked components that have an accessible parent (i.e. components within a layout container) can be deleted.
-
Here you can predefine the template layout for the required device formats. Layout mode for template authoring has the same functionality as the Layout mode for page authoring.
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:

Dikkat:
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 and define policy for the template and its compontnes.
- Components defined in the template structure cannot be moved on a resulting page nor deleted from any resulting 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.
- The design policies for the components and page are defined.

-
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
Not:
When you add an 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.
Not:
Although not identical, adding components and assets to a template has many similiarities to similar actions when page authoring.
-
Policy & Properties (General)
The content (or design) policies define the design properties of a component. For example, the components available or minimum/maximum dimensions. These are applicable to the template (and pages created with the template).
Create a content policy, or select an existing one, for a component. This allows you to define the design details.
The configuration window is divided in two.
- In the left side of the dialogue under Policy, you have the ability to select an existing policy or select an existing one.
- In the right side of the dialogue under Properties, you can set the properties specific to the component type.
The properties available are dependent on the selected component. For example, for a text component the properties define the copy and paste options, formatting options, and paragraph style amongst other options.
Policy
The content (or design) policies define the design properties of a component. For example, the components available or minimum/maximum dimensions. These are applicable to the template (and pages created with the template).
Under Policy you can select an existing policy to apply to the component via the drop-down.
A new policy can be added by selecting the add button next to the Select policy dropdown. A new title should then be given in the Policy Title field.
The selected existing policy in the Select policy dropdown can be copied as a new policy using the copy button next to the dropdown. A new title should then be given in the Policy Title field. By default the copied policy will be titled Copy of X, where X is the title of the copied policy.
In the Other templates also using the selected policy section, you can easily see which other templates use the policy selected in the Select policy dropdown.
Not:
If multiple components of the same type are added as initial content, the same policy applies to all the components. This mirrors the same restriction in Design Mode for static templates.
Properties
Under the Properties heading you can define the settings of the component. The heading has two tabs:
- Main
- Features
Main
On the Main tab, the most important settings of the component are defined.
For example for an image component the allowed widths can be defined along with enabling lazy loading.
If a setting allows for multiple configurations, click or tap the Add button to add another configuration.
To remove a configuration, click or tap the Delete button located to the right of the configuration.
Features
The Features tab allows you to enable or disable additional features of the component.
For example for an image component you can define the cropping proportions, allowed image orientations, and if uploads are allowed.
Dikkat:
Note that in AEM crop ratios are defined as height/width. This differs from the conventional definition of width/height and is done for legacy compatability reasons. The page authoring users will not be aware of any difference provided you define the Name clearly as this is what is displayed in the UI.
-
Policy & Properties (Layout Container)
The policy and properties settings of a layout container are similar to the general usage, but with some differences.
Not:
Configuring a policy is mandatory for container components as it enables you to define components that will be available in the container.
Policy
The content (or design) policies define the design properties of a component. For example, the components available or minimum/maximum dimensions. These are applicable to the template (and pages created with the template).
Under Policy you can select an existing policy to apply to the component via the drop-down. This functions just as it does in the general usage of the window.
Properties
Under the Properties heading you can choose which components are available for the layout container and define their settings. The heading has three tabs:
- Allowed Components
- Default Components
- Responsive Settings
Allowed Components
On the Allowed Components tab, you define which components are available for the layout container.
- The components are grouped by their component groups, which can be expanded and collapsed.
- An entire group can be selected, by checking the group name and all can be deselected by unchecking.
- A minus represents at least one but not all items in a group are selected.
- A search is available to filter for a component by name.
- The counts listed to the right of the component group name represent the total number of selected components in those groups regardless of the filter.
Default Components
On the Default Components tab, you define which components are automatically associated with given media types so that when an author drags an asset from the asset browser, AEM knows with which component to associate it. Note that only components with drop zones are available for such configuration.
Click or tap Add Mapping to add an entirely new component and MIME type mapping.
Select a component in the list and click or tap Add type to add an additional MIME type to an already mapped component. Click the Delete icon to remove a MIME type.
-
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.
- Already entered content is considered initial content and is only visible in Initial Content mode.
- 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 resulting 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 but they will be shown in Initial Content mode. In Structure Mode, only the container component itself will be shown with its list of Allowed Components.
To save space, the layout container does not grow to accomodate the list of allowed components. Rather the container becomes a scrollable list.
Components that are configurable are shown with a Policy icon, which can be tapped or clicked to edit the policy and properties of that component.
Initial Content mode is used to defined content that will appear when a page is first created based on the template. The initial content 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.
Not:
Initial Content mode can be thought of edit mode for pages created with that template. Therefore policies are not defined in Initial Content mode but rather in Structure mode.
-
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 resulting 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 layout for templates operates as it does for page authoring.
Not:
Changes to the layout will be reflected in Initial Content mode, but no change is seen in Structure mode.

The page design including required client-side libraries and page policies are maintained under the Page Design option of the Page Information menu.
To access the Page Design dialog:
-
The Page Design dialog opens and is divided into two sections:
- The left half defines the page policies
- The right half defines the page properties
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.

-
A new policy can be added by selecting the add button next to the Select policy dropdown. A new title should then be given in the Policy Title field.
The selected existing policy in the Select policy dropdown can be copied as a new policy using the copy button next to the dropdown. A new title should then be given in the Policy Title field. By default the copied policy will be titled Copy of X, where X is the title of the copied policy.
Using page properties, you can define the required client-side libraries by using the Page Design dialog. These client-side libraries include stylesheets and javascript to be loaded with the template and pages created with that template.

Not:
While the template author can specify the page policy on the template, he or she will need to get details of the appropriate client-side libraries from the developer.
Using the Initial Page Properties option, 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 pages created from them:
- Changes to the structure:
- These are immediately applied to the resulting 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 depend on whether the modified component is part of:
- Structure-only - applied immediately
- Contain initial content - only on pages created after the change
Take special caution when:
- 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.
Not:
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.