Create maps based on customized templates id225VF0808MP
You can create customized map templates and use them to create DITA maps along with the topic templates and map templates referenced in the map template
You can refer to other map templates and topic templates from the customized map template. The referred map templates can refer to various map templates, topic templates, topics, maps, images, videos, and other assets. The customized map template can help you very easily replicate the map templates and the entire referred folder structure. These customized templates are especially useful to create and recreate multiple maps which have recursive structures and references.
Create customized templates
AEM Guides allows you to create customized maps and topics from the dita-templates folder. You can use these customized templates to create your map and topic. You can also share these templates with your authors, and they can use them to create their files. Using these templates, you can allow the authors to keep separate copies of certain resources which are inside the templates folder.
You can create map and topic templates in the following ways:
- Templates pane of the Left panel
- Templates in Assets UI
- Options menu
Templates in Assets UI templates-assets-ui
Topic template
Perform the following steps to create a topic template:
-
In the Assets UI, navigate to the dita-templates folder.
{width="800"}
-
Click topics folder to open it.Click Create > DITA Template.
-
On the Blueprint page, select Topic and then click Next.
-
On the Properties page, specify the topic template Title.
-
Specify the file Name
note note NOTE The file name must have the .dita extension. -
(Optional) Add a description.
-
Click Create. The topic template created message appears. You can then open the topic template and edit it.
Map template
Perform the following steps to create a map template:
-
In the Assets UI, navigate to the dita-templates folder.
-
Click maps folder to open it.
-
Click Create > DITA Template.
{width="300"}
-
On the Blueprint page, select Map and click Next.
-
On the Properties page, specify the map template Title.
-
Specify the file Name.
note note NOTE The file name must have the .ditamap extension. -
(Optional) Add a description.Click Create. The map template created message appears. You can then open the map template and edit it. You can add the references for the topic templates, map templates, and also other assets in the map template.
Options menu options-menu
To create a map or topic template, perform the following steps:
-
Select the Map or Topic folder in the current templates folder. For example,
dita-templates
folder. -
From the Options menu, select Create Map Template or Create Topic Template.
The Create New Map Template or the Create New Topic Template dialog opens.
-
Enter the title and the name of the new template.
-
Choose the type of template that you want to create from the Template drop-down list.
The map template created message appears. You can add the template to your global or folder-level profile. The new template then appears in the topic or map creation process, and you can create maps or topics using it.
Your administrator can also create a folder and configure it to be the folder wherein you can create and save the templates.
Based on your setup learn how to configure custom DITA template folder path:
Pass on the title defined in the templates
If you want to pass on the title of the topic or map used inside your template to the DITA maps created using that template, use curly brackets around the title.
Example
<pubtitle>
<mainpubtitle outputclass="booktitle">
{title}
</mainpubtitle>
<subtitle>Subtitle</subtitle>
</pubtitle>
The resultant DITA map with title "Rootmap1" will look like as follows:
<pubtitle>
<mainpubtitle outputclass="booktitle">Rootmap1
</mainpubtitle>
<subtitle>Subtitle</subtitle>
</pubtitle>
If you do not use curly brackets around the title the resultant DITA map only the first element will be picked and the nesting of the title will not be picked from the template and it will look as follows:
<pubtitle> Rootmap1 </pubtitle>
Example
<title>
<sub>
<b>{title}</b>
</sub>
</title>
Use the map template to create new maps
Perform the following steps to create a map using the custom map template:
-
In the Assets UI, navigate to the folder where you want to create the map.
-
Click Create > DITA Map.
-
On the Blueprint page, select the map template you want to use and click Next. For example, if you have created a map template ‘test-template’, select it.
-
On the Properties page, specify the map Title.
-
Specify the file Name.
note note NOTE The file name must have the .ditamap extension. -
Click Create. The map created message appears.
The map generates all assets which are referred to inside the template folder. Some types of assets that are referred in a map can be as follows:
-
If the map contains the reference to a topic template, a copy of it is created inside the folder, in the same hierarchy as in the topics folder in the
dita-templates
folder. -
If the map contains the reference to a map template, a copy of it is created inside the folder, in the same hierarchy as in the maps folder in the
dita-templates
folder. -
If the map contains the generic reference to a topic or map outside the
dita-templates/topics
ordita-templates/maps
folder, the same is only referred to, and no copy is created.note note NOTE dita-templates/topics
anddita-templates/maps
are the default paths in Guides and are configurable.If there is a topic template key definition inside the map template, a new key (therefore new topic) is created and referred to in the map.
-
If another map or topic is created at the same level in the folder, then the names of the newly created assets are appended with 0,1,2, and so on. You can choose to open the map for editing or save the map file in the repository.
Parent topic:Work with the Map Editor