Conditions are what give our single sourced content its flexibility. Conditions are a way of tagging content with metadata that you can use to include or exclude content when you build your target. For instance, we have a set of conditions for Audience. If a topic is the same for both customers and internal employees except for one paragraph, you can write two versions of that paragraph in the topic and have the target include/exclude each as appropriate when you are building your outputs.
All conditions you are likely to need are created for you already.
There are two major actions to using conditions, tagging the content and setting the filters.
Tagging Content with Conditions
- Open the topic in which you need to apply condition tags if it is not already open.
- Click the structure bar for the content you would like to tag.
- Right click the element and select Conditions from the dropdown selector.
- On the left pane, select the Set that contains the tag you want to add.
- On the right pane, locate and toggle ON the condition(s) you want to add.
- Continue toggling on all conditions that should apply to this content. This almost always also includes the Hide condition found in the Functional set. Content with the Hide tag is hidden by default unless explicitly included.
- Click OK to save. The structure bar for the tagged element will now show colors that indicate it has tags on.
You can hover your mouse over any tagged element to see what tags are applied to it.
Setting Filters on Targets
For each target we use, we set filters that specify what tagged content should be included or excluded.
- Untagged content is always included.
- If an element has both included and excluded tags, include always wins.
- Always set the Functional.Hide tag to exclude in your targets.
Setting up targets is generally something that the Technical Editor will assist you with. However, if you do have to set filters:
- Open the Target in which you want to set filters. Targets are found in the Project Organizer.
- Select the Conditional Text tab on the left side of the Target window.
- Toggle only the tags you are concerned with to Include or Exclude as needed. you do not need to visit every possible option in every target.
You will notice that the interface for tagging content and for setting filters is largely the same. Remember that if you have include and exclude options, you are setting filters. If you only have a single toggle, you are assigning those tags to something.
- Save your changes.
- Build a test output to see if your tags are assigned correctly, or use the preview in the XML Editor.