Creating and Inserting Snippets
Now let's create a new snippet and make sure it is inserted in two locations.
[Menu Proxy — Headings — Online — Depth3 ]
How to Create a Snippet
- In the Content Explorer, double-click Home.htm. The topic opens in the XML Editor.
-
Select the content under the "Welcome" heading.
- Select the Home ribbon, and click Create Snippet. The Create Snippet dialog opens.
- In the Snippet File field, type Austin-Intro. This is the name for your snippet.
- In the Project Folder field, you can enter a location where you want to save your snippet. By default, snippets are saved in the Content folder in the Resources > Snippets folder. This is the recommended location for snippets, so we will not change this path.
- Make sure the check box Replace Source Content with the New Snippet is selected. Since we want to use the snippet in the current topic, this will automatically insert the snippet into that topic for us.
-
Click Create. Flare Desktop creates the snippet, inserts it into the topic, and adds the snippet file to the Content Explorer. Notice that the structure bars on the left side of the content (representing the individual paragraphs and the list) have been replaced by a single structure bar (i.e., the snippet block), and the snippet is surrounded by light gray brackets.
-
Click
to save your work.
How to Insert a Snippet
Now that we have created a snippet, we will insert it into another topic.
- In the Content Explorer, double-click Introduction.htm. The topic opens in the XML Editor.
- Click at the end of the Introduction heading and press ENTER to create a new empty paragraph after it. This is where we will insert the snippet.
- Select the Insert ribbon, and click Snippet. The Insert Snippet Link dialog opens.
-
In the Select Snippet section, navigate to Content > Resources > Snippets > Austin-Intro.flsnp. When you select the snippet, you will see it in the Preview section so you can confirm that you have selected the correct snippet.
-
Click OK. The snippet appears in the topic between the main heading and the History section.
-
Click
to save your work.