Share:
ClickHelp Documentation

Conditional Content

ClickHelp supports conditional content blocks. Those content blocks in your topics always exist in the documentation project source, but may be included or excluded during the project publishing process. 


You can easily manage your conditional content blocks using the Design View. To do this, follow the steps below:

  • Open the Single-Sourcing tab on the editor's ribbon bar.
  • Navigate to the Conditional Content group.
  • Click the Output Tag text field and pick appropriate tags from the list (you can choose more than one output tag).

  • Choose either the Insert Including or Insert Excluding ribbon item depending on your task. 
  • Now, copy the desired text passage into the block that has appeared.

To delete a conditional block:
  • Select it by clicking the element in the top-left corner of the block (it shows the output tags used for this text passage).
  • Press Delete on your keyboard or click the Delete Element button in the Tag Inspector line above the editor - this will delete the block and its entire content.

When adding a conditional block in the Source editing mode, you specify when to include the block and when to exclude it in the "tags" attribute of the "ch:include" or "ch:exclude" tag. Here is a sample syntax for both tags:

How to include some content to a publication that uses the "OnlineDoc" output tag:

<ch:include tags="OnlineDoc">
  This content will be included only when using the "OnlineDoc" output tag.
</ch:include>

How to exclude some content from a publication that uses the "OnlineDoc" output tag:

<ch:exclude tags="OnlineDoc">
  This content will be excluded from the publication when using the "OnlineDoc" output tag.
</ch:exclude>

The "tags" attribute can contain several output tag names delimited with a comma. For example:

<ch:include tags="OnlineDoc,PrintedDoc">
  This content will be included only when using the "OnlineDoc" or "PrintedDoc" output tag.
</ch:include>