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
example
Let's say that you have a table with 15 rows and four columns. Suppose that the table needs to be included in 40 topics. Rather than copying and pasting the table 40 times, you create one snippet containing the table and insert it into those 40 topics. However, suppose that in 30 of those topics, you need to add three more rows to the table to explain something. In the remaining 10 topics, the three additional rows are not necessary. Otherwise, the table content is the same in all 40 topics. What do you do? You have a few options.
The first option is to add a note to the table explaining that the three additional rows are intended only for some of the topics but not others. However, this might be confusing to your readers.
The second option is to create two separate snippets—one for the 30 topics and another for the 10 topics. However, this means that you need to maintain identical information in two different places. And that is no way to single-source your content.
The third option is to create snippet conditions. Here is how you might do it in this example:
For more information, see About Snippets, Creating Condition Tags, and Applying Condition Tags to Content.
How to use snippet conditions
Create all of the condition tags that you plan to use for separating your snippet content.
Note: The more variations that you will have in your snippet content, the more condition tags you will need to create. An average number is four to eight condition tags, but you may find that you require fewer or more tags than this for snippet content. It is always preferable to create more condition tags than you may need, rather than to realize later that you have too few. You can even create a separate condition tag set to be used specifically for holding your snippet condition tags (while keeping your regular condition tags in other tag sets).
Tip: It is also a good idea to include the word "Snippet" somewhere in the name of a new snippet condition tag. This way, you can easily identify it, rather than confusing it with the regular condition tags that you use for other purposes
See Creating Condition Tags and Adding Condition Tag Set Files.
Create and open the snippet.
See Creating New Snippets from Existing Content and Opening Snippets.
Apply the necessary condition tags to the text or other content in the snippet.
See Applying Condition Tags to Content.
Note: It is a good idea to click the Hide/Show Conditional Indicators button
at the bottom of the local toolbar so that you can clearly see where the different tags have been applied in the snippet.
Insert the snippet into the necessary topics, or determine which topics already contain the snippet.
See Inserting Snippets into Topics and Viewing Link Dependencies.
After you determine that a particular topic should display only certain tagged content from the inserted snippet, open the Content Explorer and select the topic file.
Note: If there are several topics that you know in advance will include a particular snippet condition tag, you can open the File List window pane (View>File List) instead and select all of those files at the same time.
In the local toolbar, click
.
The Properties dialog for the topic opens.
Next to all of the snippet condition tag(s) not to be included in the topic, click the Exclude check box.
By default all snippet tags will be included in the topic unless you specify otherwise by clicking Exclude.
Why is there an Include check box if all tags are included by default? The Include check box is necessary in case you have two or more tags associated with the same content and there is a conflict.
example
Suppose you have two condition tags in your
You have created a
By default, Flare will include
This is why it is a good idea to create enough snippet condition tags in advance. If sometime later you realize you need to create additional snippet condition tags, you may find that you need to revisit all of the topics where you have already inserted snippets with conditions. Why? Because by default the snippets containing the new tags will be displayed in all topics unless you specify otherwise.