Content Templates
When a template is created and enabled, it can be used from the Create New drop-down menu by any user with the privileges to create new files in the CCMS.
If all your policy documents follow a similar format, it may be a good idea to create a template that contains the basic elements and structure used in that document type.
If you use id
attribute placeholders in the templates, you are expected to see an XML validation warning next to the template in the Content Library. Ignore the warning. For more information, see Add Placeholders and Warehouses to a Template.
Guidelines
Keep these guidelines in mind when creating templates:
You can restrict access to template configuration files to prevent unwanted changes to the templates by using permissions.
You can add variable elements and metadata to a template.
You can provide internal guidance on how to use a template by including draft comment elements or XML comments in the template. Text in draft comment elements is not included in outputs. For information on using XML comments, see XML Comments.
You can include any allowed elements or content in a template.
Examples
Templates or specializations?
Templates are based on standard DITA map and topic elements and can be created by anyone. Specializations are extensions of the standard DITA content types and elements. If you are interested in using specializations, contact your Customer Success Manager.
If you use id
attribute placeholders in the templates, you are expected to see an XML validation warning next to the template in the Content Library. Ignore the warning. For more information, see Add Placeholders and Warehouses to a Template.
Configure a Template Process
Create a Topic Template
Create a topic template with the desired structure and content.
Create a Map Template
Create a map template with the desired topics, elements, and content.
Add Placeholders and Warehouses to a Template
Set up content templates to auto-generate new IDs, automatically include author information in the prolog element, create titles based on the file name, reuse content, and more. For a complete list of placeholder options with examples, see Content Templates Placeholder Options Reference.
Enable the new templates so that they are available in the Create New drop-down menu.
Enable a Template
Disable a Template
If you no longer need a template or you don't want a template to be available in the
Create New drop-down menu, you can disable it by
commenting out the <label>
and <instance>
elements in the .xml file relevant to that template.
You have disabled the selected content template. As a result, this template is no longer visible in the Create New drop-down menu.
Content Templates Placeholder Options Reference
Several placeholders are available for use in content templates. When you use these placeholders, the CCMS populates the actual content when you create new content topics or maps.
[RANDOM]
-
Generates up to 10,000 different 4-digit ID numbers in an
id
attribute value. Use it to generate element IDs. Element ID values can contain placeholders with and without prefixes, however, using a letter or word as a prefix is best practice, especially for HTML4 output. For more information, see w3.org.Element ID placeholder with a section- prefix:
<section id="section-[RANDOM]">
[RANDOM_UUID]
-
Generates a random a random 128-bit hexadecimal identifier (0-9, A-F) in this format,
1411fz2f-efdd-4892-83a0-53adf1148c83
, in anid
attribute value. Preferred over[RANDOM]
to generate map and topic IDs.<map id="map-[RANDOM_UUID]">
Important:Map ID values must start with a letter. Topic ID values must start with a letter or number. Otherwise, validation errors in files created from templates will occur.
[FILE_UUID]
-
Inserts the resource UUID in an
id
attribute value. Preferred over[RANDOM]
to generate map and topic IDs. Generates IDs that match the file UUID. For details about resource UUID, see Get a Resource UUID.<map id="map-[FILE_UUID]">
Important:Map ID values must start with a letter. Topic ID values must start with a letter or number. Otherwise, validation errors in files created from templates will occur.
[REQUESTED_FILE_NAME_ESCAPED_WITHOUT_EXTENSION]
-
Inserts the file name in the map or topic ID value. Underscores and hyphens are retained, and spaces are replaced with underscores (_). Use instead of the
[RANDOM]
,[RANDOM_UUID]
, or[FILE_UUID]
placeholders.<topic id="[REQUESTED_FILE_NAME_ESCAPED_WITHOUT_EXTENSION]">
[REQUESTED_FILE_NAME_WITHOUT_EXTENSION]
-
Generates the topic title based on what you type for the file name.
<title>[REQUESTED_FILE_NAME_WITHOUT_EXTENSION]</title>
Note:If you use this placeholder, users will be prompted to enter a unique file name, but will not be able to change the title of the document from the Create new window. If you want to use a consistent map or topic title, such as Policy & Procedures, add Policy & Procedures the title to the template.
[CURRENT_USER_FIRSTNAME]
,[CURRENT_USER_LASTNAME]
,[CURRENT_USERNAME]
-
Inserts the file creator's first name, last name, and CCMS user name (e-mail address) respectively as specified in their user configuration.
<prolog> <author type="creator">[CURRENT_USER_FIRSTNAME] [CURRENT_USER_LASTNAME] <[CURRENT_USERNAME]></author> </prolog>
[CURRENT_DATETIME_FORMATTED_BY_yyyy/MM/dd]
-
Inserts a snapshot of the current time upon file creation. The value is provided in the format of Year/Month/Day and can't be modified by users upon file creation. The snapshot created by this placeholder is visible only in the XML. The date visible in the Created field of the Overview tab is a CCMS metadata saved independently.
<prolog> <author>(...)</author> <critdates> <created date="[CURRENT_DATETIME_FORMATTED_BY_yyyy/MM/dd]"> </critdates> </prolog>
If you want dates to be in the format of Day/Month/Year, replace
yyyy/MM/dd
withdd/MM/yyyy
.Note:You can configure your preferred date and time format and include a time zone according to these internationalization conventions. Use an underscore (_) as a separator, for example, to separate date and time:
yyyy/MM/dd_H/m
.- y - year (yyyy = 2025, yy = 25)
- M - month (MMMM = October, MMM = Oct, MM = 10, M = 9)
- d - day of month
- E - day of week (EEEE = Wednesday, EEE = Wed)
- h/H - hour (12/24-hour)
- m - minutes
- s - seconds
- a - AM/PM
- z - time zone
[DATE_FORMATTED_BY_yyyy/MM/dd]
-
Adds a date picker to the Create new window where users can set a past, present, or future date upon file creation. The snapshot created by this placeholder is visible only in the XML. The date visible in the Created field of the Overview tab is a CCMS metadata saved independently.
<prolog> <author>(...)</author> <critdates> <created date="[DATE_FORMATTED_BY_yyyy/MM/dd]"/> </critdates> </prolog>
If you want dates to be in the format of Day/Month/Year, replace
yyyy/MM/dd
withdd/MM/yyyy
. With this placeholder, you can only configure the year, month, and day.Figure 7. A date picker in the Create new window Note:You can configure your preferred date and time format according to these internationalization conventions.
- y - year (yyyy = 2025, yy = 25)
- M - month (MMMM = October, MMM = Oct, MM = 10, M = 9)
- d - day of month