How conditional output works

<< Click to Display Table of Contents >>

Navigation:  More Advanced Procedures > Conditions and Customized Output >

How conditional output works

Help+Manual projects are made up of chapters, topics and the content of topics. You can use conditional output to include or exclude content on all these levels: Entire chapters, topics or specific content within topics. You do this by "tagging" chapters, topics and content with conditions known as "include conditions" or "build conditions". Then when you publish your project you select or deselect the matching tags in the Publish dialog to include or include the tagged content.

This is a two-step process, which is outlined below. For full details please study the rest of this chapter.

Step 1: Tag your content with include conditions

This step identifies the content you want to include or exclude when you publish. You can tag the content with format conditions (PDF, CHM, HTML etc.) or user-defined conditions (for example DEMOBUILD, BILLS_VERSION, FUTURE_FUNCTIONS).

Tagging content in topics

This is done with the BTN_Insert_Condition Conditional Text Tool in Write > Insert Object. This tool places "conditional text" tags at the beginning and end of the content you want to include or exclude, using an IF ... END syntax. For example IF_PDF ..... END, or IF_PDF,HTML,CHM ... END and so on

Tagging topics and chapters

This is done with the Change > Include in Builds settings in Project > Manage Topics. These settings can also be accessed by right-clicking on topics in the Table of Contents or Topic Files sections of the Project Explorer.

Note that if you tag a chapter with build conditions the tags will not be set for all the chapter's sub-topics. You need to multi-select all the topics for which you want to apply conditions.

Step 2: Select the include options when you publish

When you publish your project you then select or deselect the available include options in the Publish dialog. Format conditions are selected automatically, so if you are publishing to PDF all content tagged with IF_PDF will be included in your output.

User-defined conditions must be selected manually: For example, to include all content identified with DEMOBUILD you need to select the DEMOBUILD option in the Publish dialog, and to exclude it from your output you deselect it.