Reuse multiple topics at once
You can reuse multiple topics at once from a table of contents (TOC). For example, if the installation and setup are applicable for multiple help instances.
Make a table of contents section reusable
You can reuse any part of the TOC by assigning an ID to a <toc-element>
or a <snippet>
and then including this element elsewhere. However, it is recommended to put reusable pieces of the TOC into a dedicated library instance.
TOC library instance is a special type of instance that is used to store reusable TOC fragments but doesn't build.
Create a TOC library instance
In the Writerside tool window, right-click the current instance name.
Select New Library.
Specify a library name and ID.
Click OK.
Group TOC elements, there are two ways to do this:
Wrap them with a
<snippet>
element and assign a uniqueid
.<snippet id="installation-guide"> <toc-element topic="Install.topic"/> <toc-element topic="Setup.topic" toc-title="Initial setup"/> <toc-element topic="Update.topic"/> <toc-element topic="Uninstall.topic"/> </snippet>Create a
<toc-element>
that groups a few toc-elements under it and assign a uniqueid
attribute to it. It can be an ordinary topic that contains content or a wrapper topic.You can do this using drag and drop or by editing a .tree file.
<toc-element toc-title="Installation_guide.topic" id="installation-guide"> <toc-element topic="Install.topic"/> <toc-element topic="Setup.topic" toc-title="Initial setup"/> <toc-element topic="Update.topic"/> <toc-element topic="Uninstall.topic"/> </toc-element>
Reuse a group of topics
You can reuse a group of topics either by reusing a toc-element
or a snippet
element by an ID.
Add the
include
tag to a target tree.In the
from
attribute specify an ID of atoc-element
or asnippet
element. In this case, it is toc_chunks.In the
element-id
attribute specify the elementid
.

