Snippets are pre-set chunks of content that you can use in your project over and over. They are somewhat similar to variables. The difference between variables and snippets is:
Variables are used for brief, non-formatted pieces of content (such as the name of your company's product or your company's phone number). There are different kinds of variables: (1) those you create, (2) system variables (e.g., date and time; Chapter, Section, and Volume numbers), (3) Heading variables, and (4) Running Head variables. Some of these are especially useful for page headers and footers
Snippets are used for longer pieces of content that you can format just as you would any other content in a topic. In snippets, you can also insert tables, pictures, and whatever else can be included in a normal topic. The major benefit of using snippets is that you only have to create your content once, rather than having to type the same information in each topic where you want to use it. If you need to modify the content of a snippet, you only need to change it in one place and the change is made automatically everywhere that the snippet is added.
example
Let's say you are writing a manual about dogs. In one topic, you have created a colorful table with pictures that lists the top five breeds. Let's say you want to place that same table in seven other topics. You have a choice. (1) You can re-create that table manually in each of those topics. (2) You can copy the first table and paste it into the other topics. This is a better solution, but if you need to make changes to the table in the future, you'll need to do so in all eight topics. (3) You can create a snippet from the table and insert it into each of the other topics. This is the best solution because, if you need to make changes in the future, you only need to do so within the snippet and the changes are automatically reflected in all eight topics.
Snippets are contained in their own files (using an .flsnp file extension). You can therefore share them with other authors or use them in other projects. If you insert a snippet that is stored outside of your project, the file is copied to your project. Snippet files are stored in the Content Explorer, within the Resources\Snippets folder.
You can create a text snippet or a block snippet. This is determined by the way you insert the snippet. If you insert a snippet on a blank line in a topic, it is inserted as a block snippet and takes up all of the room so that no other content can be added. If you insert a snippet on a line where other content exists, it is inserted as a text snippet. Therefore, if you want to insert a snippet on a blank line and also type other text before or after it, you need to type the text first and then insert the snippet afterwards. Also, if you have a snippet containing multiple paragraphs and insert it within a line of text, the snippet becomes just one continuous line of text because it is a text snippet.
When you create a text or block snippet, it displays surrounded by brackets (if you have markers turned on).
Show me…
You can apply a condition tag to a snippet so that it is included in some targets but not in other targets. See Applying Condition Tags to Content.
You can also create snippet conditions. Snippet conditions are condition tags that you can apply to content within snippets. With snippet conditions, you can separate certain snippet content so that it displays in some topics
Following are the main tasks involved with using snippets.
Add snippets You can add a new snippet (without necessarily having any topic open). See Adding New Snippets.
Note: You can also import an existing snippet from outside your project.
Insert snippets After you create or add snippets, you can insert them into any topic in your project. See Inserting Snippets into Topics.
Note: You can also create nested snippets (i.e., a snippet within a snippet). To do this, simply open a snippet and then insert another snippet into it.