By default, all topics and content created in an HelpNDoc project will be generated in every builds and documentation formats. It is possible to conditionally generate topics and content using build tags and conditions:

Conditional topic generation

A topic can be included or not in specific builds based on build kind and build tags. By default a topic is included in all builds. To choose which build will include a topic, select the topic in the table of contents then:

See the How to setup conditional topic generation step-by-step guide.

Conditional content generation

HelpNDoc provides an easy way to define sections (parts of topics) which will only be included in specific builds using conditional sections. Those logical statements (If, Else If, Else, End) can be inserted within a topic using the "Insert" ribbon tab.

Using the "Insert conditional operation" dialog box, choose between one of the operations:

To edit an existing conditional operation in the topic editor, double click the condition label. This will open the "Insert / Edit condition" dialog box, where you can modify the operation type, tags, and condition settings.

Warning: Starting with HelpNDoc 10.6, conditional content tags can now be nested. Because of this change, existing projects should be reviewed carefully. Previously, an IF condition that followed another IF condition was automatically interpreted as an ELSE IF. This is no longer the case. To help identify affected content, use the built-in project analyzer to locate conditional content throughout the project and verify that existing conditions still behave as intended.

See the How to setup conditional content generation step-by-step guide.

Define custom tags

To define custom tags, you can either:

See the How to manage build tags step-by-step guide.

Associate tags with builds

Each build can include one or more custom tag. To add custom tags to a specific build:

See the How to maintain tags associated with output builds step-by-step guide.