Using templates on a content page

Making templates available

Templates are made available for a site through the DXP settings screen, where they can be added to a list of available templates.

This is different from layouts, which are added to component sets.

Adding a template to a site

Add a template to the available templates list:

  1. Right-click on the site in the asset tree.

  2. Select DXP Settings.

  3. Click Edit.

  4. Go to the Content templates section.

  5. Click + below the list of Available templates. Enter a template ID or select an asset by using the selector icon.

  6. Click Save.

After saving, you can return to a page and apply the new template.

Removing a template from a site

Remove a template from the available templates list:

  1. Right-click on the site in the asset tree.

  2. Select DXP Settings.

  3. Click Edit.

  4. Go to the Content templates section.

  5. Remove the template from the Available templates list. Click the remove icon next to the template you want to remove.

  6. Click Save.

Removing a template from the available templates list prevents content editors from applying it to new pages. Pages that already use the template continue to function normally. The template structure remains intact on those pages.

Applying, changing, or removing a template

On a content page, you can select and apply a template from a list.

A notification indicates the absence of a template and prompts you to select and apply one from the list.

The page must not have any unsaved changes before a template can be applied, changed, or removed. This requirement prevents data loss during the structural swap that occurs when templates are applied or changed.

When you change or remove a template, the system preserves your editable content by matching zone identifiers between templates. Content that cannot be matched moves to a designated primary zone or appears in an unused content panel for resolution. Read the Zone IDs and ID history documentation for more information.

When a template is removed, any editable content you added is retained, but the template-managed structure is removed.

Removal is not final until you explicitly save the page.

Applying a template to a page

Templates are assets that adhere to standard publishing workflows.

They must be published before being available for content editors to add to pages.

Ensure the template is published by using the Approve and Make Live action.

Add the published template to the site’s available templates in the DXP settings screen.

This screen gives site builders and admins control over the templates actively used on a site.

The template header on content pages appears only when templates have been configured and added to the site.

  1. Open an existing content page or create a new one. Ensure there are no unsaved changes on the page.

  2. Locate the template indicator on the content screen. The indicator displays "No content template" when no template is applied.

  3. Click +. This button is labeled Apply template. This option appears only if templates are available.

  4. Select the required template from the list. The template structure applies instantly to the page. This includes zones and template-managed content.

  5. Click Save to finalize the application. While the application is instant, changes are not permanent until you explicitly save the page.

Changing a template on a page

Changing a template requires careful handling of existing content.

This applies especially to zone IDs and compatibility rules.

Each template zone has a unique identifier called a Zone ID. When you change templates, the system uses these IDs to match content from the old template’s zones to corresponding zones in the new template. If zone IDs match, your content flows to the correct location. If they do not match, content moves to the primary zone instead.

Read the Zone IDs and ID history documentation for more information.

  1. Ensure there are no unsaved changes on the content page.

  2. Locate the template indicator on the content screen.

  3. Select a new template from the available templates.

    If the new template shares matching zone IDs with the previous template, existing content flows to the corresponding zones. The system attempts to match content from the original template’s zones (or non-templated content) to zones in the new template structure based on these IDs.

    If the zone IDs do not match, the content is moved to the primary zone.

    The primary zone is the unique destination for any content that lacks a designated template zone context. Read the Primary content zone documentation for more information.

  4. Resolve any disallowed content.

    If the new template’s zone rules ban components already on the page, that content moves to the "Unused content" panel.

    This creates an error state that must be resolved before the change can be saved.

    Move this content to an allowed zone or delete it.

    Read the Handling unused content documentation for more information.

  5. Click Save to finalize the change.

    Changes are not permanent until you explicitly save the page.

Removing a template from a page

This section covers removing a template from a content page.

To remove a template from the available templates list, see Removing a template from a site.

To trash the template asset in Squiz CMS, see Trashing or purging a template asset.

To remove a template from a page while retaining user-created content:

  1. Ensure there are no unsaved changes on the content page.

  2. Locate the template indicator that displays the applied template.

  3. Select the option to remove the template.

    Editable content on the page is retained and placed in a single stacked order.

    Content managed exclusively by the template is discarded. See What content is retained and What content is discarded for details.

  4. Click Save to make the removal permanent.

    Changes are not finalized until you explicitly save the page.

What content is retained

The removal process prevents loss of content created by editors.

Content retained includes the following:

Page-managed zones

Zones controlled by the content page author where content is added, removed, or reordered.

Template-managed unlocked zones

Zones where the template provides structure and content are editable.

What content is discarded

Content discarded includes the following:

Template-managed locked zones

Zones where the template builder added content and prevents editing.

The content editor experience

You see a structured page with component names displayed.

Locked sections and designated zones are available for adding your own content.

Drag handles and other structural controls are hidden for template-managed areas.

Moving layouts on content pages

Move layouts within page-managed zones on content pages that have templates applied.

This rearranges your content structure while maintaining the overall template design.

Replacing content with templates

Replace existing content on a page with a template.

This process removes the current content structure.

This applies the template’s predefined layout and components.

When you apply a template to a page that already has content, that content moves into the template’s primary content zone.

This preserves your existing content while applying the new template structure.

Read the Primary content zone documentation for more information.