Skriftlig Info ➜ DITA publishing ➜ DITA topics ➜ Inserting a topic into a bookmap
(This procedure is based on the Tridion Docs database repository and Oxygen XML editor. Other tools have similar functionality.)
You have completed a topic and a suitable bookmap. The bookmap is checked out in the editor.
A topic is inserted into the bookmap using the <chapter> element. This element has an attribute href that points to the topics's GUID identifier. A simplification of the element looks like this:
<chapter href="GUID"></chapter>
There are two ways to insert the topic:
What is special about DITA is that we do not have any dedicated "chapter" or "section" elements, we only have the topics you have added to the bookmap. The fact that a topic changes properties from <topic> to <chapter> when you add it to the top level of the bookmap is only to illustrate the traditional book structure. It's just as much a topic. You build the structure by placing topics inside each other.
Place the cursor where you want to insert the topic.
From the editor's main menu, select DITA ➜ Insert topic reference.
In the dialogue box that opens, set Reference type to Chapter.
On the right side of the dialog, click the green icon to open the database.
In the database, locate the topic you want to insert.
Once you find it, double-click it to select it.
The dialogue box reopens.
Click Insert and close.
Find the topic you want to insert, and copy the GUID identifier for it.
You can retrieve the GUID identifier from the object's Properties dialog. If you've put the GUID identifier in a comment at the top of the topic, you can retrieve it from a preview. You can also open the topic to have a look.
Place the cursor where you want to insert the topic.
Press the Enter key on your keyboard and select <chapter> from the shortcut menu.
Click the start tag in the <chapter> element, then press Alt-Enter on your keyboard to open the attributes dialogue box.
Note that the <chapter> element now appears in your bookmap with the topic's GUID identifier shown.
Click the small icon that appears on the left side of the <chapter> element.
The topic opens in the editor.
Verify that you have inserted the correct topic.
Like this:
<comment>The topic's metadata title</comment> <comment>The topic's GUID identifier</comment> <chapter href="GUID">(The topic's GUID identifier is shown here)</chapter>
The comments will always tell you which topic you have inserted. If you need to copy the <chapter> element to another location, remember to include the two comments.
You can not copy a <chapter> element into a relationship table!
All external links open in a new window. I take no responsibility for information on external websites, even if I have linked to them. Please report links that do not work.
The information on this page represents my personal opinions and my understanding of the topic being described. Feel free to link to the page, but do not copy large parts of the content without permission. I take no responsibility for any errors, misunderstandings or missing information. I also take no responsibility for any mistakes you may make or cause as a result of incorrect or missing information. You are welcome to contribute with comments, relevant experiences or additional information. See Editor and contact information.
2022-11-29