Create template maps
You create template maps to create links between authoring templates and presentation templates. Template maps determine which presentation template will be used to display the elements stored in a content item.
The presentation template used by a web page is determined by:
- The content being displayed.
- The current site area.
- The relationship between the content's authoring template and a presentation template as defined in the site area.
This can result in the following relationships:
- Two content items using the same authoring template can be displayed using two different presentation templates if they are located in different site areas.
- Two content items using different authoring templates can be displayed in the same presentation template if both authoring templates are mapped to the same presentation template.
When referencing content components it is important to note the following:
- The content components a presentation template uses must be defined in the authoring template the content is based on.
- If the content component being referenced does not exist in the current content 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 content 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.
Ensure the integrity of template maps
If you save a content item under a site area that does not contain a valid template map for that content item, it is possible that the content item will not render correctly or not at all. To prevent this happening you can:
- Use the "Selected site areas only" option in your authoring template designs to ensure that you can only save content items under site areas that have a valid template map.
- Create template maps for all your authoring templates at the site level. Template maps set at the site level cascade down to all the site areas located under the site. If you would like to use a different presentation template for a specific site area, then you can specify a different template map for that site area.
Parent topic
Using presentation templates