Writerside Help

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

  1. In the Writerside tool window, right-click the current instance name.

    Instance toolbar
  2. Select New Library.

  3. Specify a library name and ID.

    Create a library
  4. Click OK.

  5. Group TOC elements, there are two ways to do this:

    Wrap them with a <snippet> element and assign a unique id.

    <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 unique id 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.

  1. Add the include tag to a target tree.

  2. In the from attribute specify an ID of a toc-element or a snippet element. In this case, it is toc_chunks.

  3. In the element-id attribute specify the element id.

<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>
<include from="toc_chunks" element-id="installation-guide"/>
Product help hierarchy on the Web
<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>
<include from="toc_chunks" element-id="installation-guide"/>
Product help hierarchy on the Web
Last modified: 23 May 2024