<html><head><link rel="canonical" href="https://www.jetbrains.com/help/writerside/reuse-topics.html.md/" data-react-helmet="true"/></head><body># Reuse topics and sections

You can add a topic into multiple [instances](instances.html). For example, if you have a topic about contacting your support team, you can publish it with every document in your documentation set.

Procedure: Reuse single topics

1. In the  Writerside tool window, select the instance to which you want to add an existing topic.

2. In the  Table of Contents pane of the  Writerside tool window, click ![](https://resources.jetbrains.com/help/img/writerside/add.svg) and select Link Topic Files to TOC.

![Reuse from another instance](https://resources.jetbrains.com/help/img/writerside/reuse-from-another.png)

3. Find the topic that you want to use in the list and select it.

&gt; **Note:**
&gt; The list contains only topic files that are not yet in the current instance. You can start typing the name of the topic file to filter the list.

Alternatively, you can open the [tree file](table-of-contents.html#edit-tree) in the editor and insert the  `[<toc-element>](instances.html#toc-element)`  with the topic file manually.

```XML
<toc-element topic="contact_support.topic">
```

&gt; **Tip:**
&gt; If a topic not in the current instance is open in the editor, Writerside shows a notification in the top part of the editor. You can either switch to the instance with this topic or add it to the currently selected instance.
&gt;
&gt;
&gt;
&gt; ![Topic not in current instance inspection](https://resources.jetbrains.com/help/img/writerside/topic-not-in-current-instance-inspection.png)
&gt;
&gt; For more information, see [Detect topic not in current instance](maintenance-and-cleanup.html#not-in-current-instance).

## Reuse sections with multiple topics

You can reuse any  `[<toc-element>](instances.html#toc-element)`  or  `[&lt;snippet&gt;](instances.html#snippet)`  from a  [tree file](help-modules.html#tree-file)  in another tree file. It is recommended to keep all reusable TOC sections in a dedicated library instance.

Procedure: Create a TOC library instance

Unlike regular [instances](instances.html), a library instance only defines reusable TOC sections and does not produce any output itself.

1. In the  Writerside tool window, right-click the current [instance](instances.html) name and select New Library.

![new library](https://resources.jetbrains.com/help/img/writerside/add-new-library-instance.png)

2. Specify a library instance name and ID, and click OK.

3. Set an ID for every  `[<toc-element>](instances.html#toc-element)`  that you want to reuse, or wrap a group of TOC elements with  `[&lt;snippet&gt;](instances.html#snippet)` .

Snippet:

```XML
<snippet id="installation-guide">
   <toc-element topic="Install.topic">
   <toc-element topic="Setup.topic">
   <toc-element topic="Update.topic">
   <toc-element topic="Uninstall.topic">
</toc-element></toc-element></toc-element></toc-element></snippet>
```

TOC element:

```XML
<toc-element toc-title="Installation guide" id="installation-guide">
       <toc-element topic="Install.topic">
       <toc-element topic="Setup.topic">
       <toc-element topic="Update.topic">
       <toc-element topic="Uninstall.topic">
</toc-element>
```

4. To insert pieces of the library instance in other tree files, use the  [&lt;include&gt;](instances.html#include)  element:

```XML
<include from="lib.tree" element-id="installation-guide">
```

Snippet:

![Product help hierarchy on the Web](https://resources.jetbrains.com/help/img/writerside/writerside-tree-snippet.png)

TOC element:

![Product help hierarchy on the Web](https://resources.jetbrains.com/help/img/writerside/web-help-tree.png)

</include></toc-element></toc-element></toc-element></toc-element></toc-element></toc-element></toc-element></toc-element></body></html>