Navigation: Conditional Compilation >

Defining Conditions

Send comments on this topic.

  

 

All entities such as a topic or conditional text block that have build options allow you to define conditions that determine when this entity should be included into the output help system.

 

How Conditions Work


Build Options contain a set of conditions, which can be evaluated during the compilation process with a positive (True) or negative (False) result. If the result is positive, the entity will be included into the output help system. If the result is negative, the entity will be excluded from the output help system.

 

Conditions in build options work similarly to conditions in a programming language. So you can implement any logic using different logical operators (e.g., OR, AND), combining conditions into groups and sub-groups, reversing the result of an individual condition or group, etc.

 

Basic Conditions


The Build Options dialog allows you to select the desired mode (IF or IF NOT) and then check or uncheck build tags in the list of basic conditions.

 

The All Builds item allows you to include or exclude (depending on the selected mode) the entity with any build tags that already exist in your help project or may be added in the future. By default, build options of topics and other entities have the "All Builds" item selected, so they are included into the output help system with any build tags.

 

The "IF" mode means that the entity will be included into the compilation when one or more of the checked build tags is selected for the given compilation.

The "IF NOT" mode means that the entity will be excluded from the compilation when one or more of the checked build tags is selected for the given compilation.

 

Please note that the basic conditions can implement OR logic only.

 

Extra Conditions


There are many situations when basic conditions implementing only OR logic are not enough. In such a case, you can add extra conditions to the second list at the Build Options dialog. Here you can add groups of conditions, select logical operators and modes (OR, AND, OR NOT, AND NOT), and, in the result, have unlimited possibilities to define when the entity should be included into the compiled help system.

 

Note: Please note that the lists of basic conditions and extra conditions work as two main condition groups, which also interact with each other. Therefore, you may need to change condition parameters of the second group by editing properties of the root item in it.

 

To add, edit, or delete a condition or group item, use the appropriate buttons under the list.

 

The Build Options dialog used to define conditions that determine when a specific entity should be included into the output help system.

 

Related Topics


Conditional Compilation: Overview

Editing Build Tags

Including/Excluding Help Topics

Conditional Text

Conditions in HTML Code

Compiling Help Project with Build Tags

Processing Dead Links



Copyright © 2007-2024 HelpSmith.com