+

Search Tips   |   Advanced Search

Template maps


Overview

Template maps determine which presentation templates are used to display each site area or content item. The presentation template used by an item is determined by the relationship between the item's authoring template and a presentation template defined in the authoring template, or a template map defined in a site area in the path of the current item. Template maps assigned in site areas will override those set in authoring templates. A content item can be displayed using two different presentation templates if linked to different site areas. Two items using different authoring templates can be displayed using the same presentation template if both authoring templates are mapped to the same presentation template.

    Defined in authoring templates

    Selecting a default presentation template in an authoring template ensures means it will be used as the default presentation template for all items based on that authoring template. Items based on that authoring template will be rendered with the same presentation template, but it does not guarantee design consistency between other items located in the same site area. If a different template map is specified in any site area in the item path, then the template map defined in the lowest part of the item path will be used instead.

    Defined in site areas

    Selecting a default presentation template in a site area ensures that items based on the selected authoring template will use the same presentation template in that site area. If a different template map is specified in any child site areas of the parent site area, the template map defined in site area in the lowest part of the item path will be used.


Examples

In these examples the following template maps are used:

  • AT_Template1 uses PT_Template1 as its default presentation template
  • AT_Template2 uses PT_Template2 as its default presentation template
  • AT_Template3 uses PT_Template2 as its default presentation template
  • AT_Template4 has no default presentation template
  • Site_Area1 has no template map
  • Site_Area2 contains a map between AT_Template1 and PT_Template2
  • Site_Area1 and Site_Area2 are located under Site_AreaA.
  • Site_AreaA contains a map between AT_Template4 and PT_Template3

The presentation template used by each item will be determined by the authoring template the item used, and the location of the item in the site framework.

Content and location Result
Content_Item1 using AT_Template1 located in Site_Area1 As Site_Area1 contains no template maps, Content_Item1 is displayed using PT_Template1 which is the default presentation template of AT_Template1.
Content_Item1 using AT_Template1 located in Site_Area2 As Site_Area2 contains a map between AT_Template1 and PT_Template2, Content_Item1 is instead displayed using PT_Template2.
Content_Item2 using AT_Template2 located in Site_Area1 As Site_Area1 contains no template maps, Content_Item2 is displayed using PT_Template2 which is the default presentation template of AT_Template2.
Content_Item3 using AT_Template3 located in Site_Area1 As Site_Area1 contains no template maps, Content_Item3 is displayed using PT_Template2 which is the default presentation template of AT_Template3.
Content_Item4 using AT_Template4 located in Site_Area1 As Site_Area1 contains no template maps, Content_Item4 is displayed using PT_Template3 which is mapped to AT_Template4 in Siate_AreaA.


Element references

The elements a presentation template uses must be defined in the authoring template the content is based on. If the element being referenced does not exist in the current item, nothing is displayed in that section of the presentation template.

Although the template author can identify a number of elements that can be displayed on the item form, whether the elements are displayed depends on the presentation template used with the authoring template to render the content form. A presentation template might not include every element defined in an authoring template, but in order for an element or element type to be available to a presentation template, the element must be included in the authoring template used to create the content.


Parent Create reusable assets