Conditional output works in the same way on all the levels where it is supported: You mark a part of your project (text, graphic, topic, chapter etc.) with a condition, referred to as an "include option" or "build option", and then choose whether you want to apply the condition when you publish your project.
Productivity Tip
You can search and replace conditional text tags. Just select "Conditional Texts" in the "Find where:" field when you search. See Searching for details.
|
Tag a topic or chapter
1.Select the topic or chapter in the TOC in the Project Explorer.
2.Select Change > Include in Builds in and select the conditions you want to apply. (You can also access these options by right-clicking on a topic in the Project Explorer.)
3.If you are excluding a topic right-click on the topic entry in the TOC and select Check Referrers to see whether any other topics link to the topic you want to exclude. If so, you need to use the Conditional Text tool (see below) to exclude any links to the topic and replace them with alternative text when the topic they link to is excluded.
When you tag chapters their sub-topics will not be tagged with the same conditions automatically – you need to use multi-select to tag multiple topics at the same time. See Topic include options for full details.
Tag content in a topic
1.Select the text you want to tag in the editor.
2.Select the Conditional Text tool with and choose the options you want to apply.
See Conditional text include options for full details. Also, there are additional features for conditional text in tables. See Conditional text in tables for details.
|
Remember that include options use OR logic! The content will be included if one or more of the selected include options applies when you publish.
Publishing to single formats and destinations:
When you publish your project select the include options that you want to apply in the Publish options. You can choose to apply individual options, combinations of options, all options or no options for every publish run. See Publishing to one format for details.
Include options based on output format are activated automatically when you select that format. For example, when you publish to HTML Help the HTML Help include option is activated.
Publishing to multiple formats and destinations:
You can also apply include options to publishing tasks when you are publishing to multiple destinations and output formats. You can define individual include options for each publishing action in your publishing tasks. See Automating Publishing Jobs for details.
|
You can use include options to "filter" the display of your topics in the TOC and Topic Files section of the Project Explorer. This makes it possible for you to see only the topics that will be included in a specific build, so that you can preview the results of specific build options without publishing your project.
1.Apply build options to one or more topics. If you don't do this filtering will not have any effect! See Conditions and Customized Output for details.
2.Select Explore > Filter in and set the filter options you want to apply. The filter settings are also available from the right-click menu in the Project Explorer (Explore > Filter).
This works both in the TOC and in Topic Files. This only filters entire topics, it does not filter conditional text tagged within your topics.
Important Notes:
•The current build settings of topics are shown in the Project Explorer, next to the topic caption in the TOC. Topics and chapters set to All Builds (the default) will always be included, of course – you cannot hide them.
•Filtered topics will be either shown in a different color or hidden completely. This depends on your settings for When filtering the table of contents... in . See Program Options - General for details on these settings. |
See also:
Variables and Conditional Output (Reference)
Publishing Your Projects
Managing topics in the Explorer