Conditional build tags

Create a conditional build tag

  1. Open a topic in Design Editor.

  2. Select Format > Apply Conditional Build Tag > New/Multiple.

  3. Click New. Type a name for the tag.

  4. Assign a color to the tag by clicking the Build Tag Color button . In the color box, click a color to select it, or click Custom Color to define a new color. If you do not assign a color to the icon, RoboHelp assigns a unique color to the icon by default.

Note: Two default tags are provided in all new projects: Online and Print. You can change their color, rename them, or apply them to topics or topic content.

Apply conditional build tags to content

Content that has a conditional build tag applied appears with diagonal hash marks in the color specified for the tag. If a project is generated using a conditional build tag expression, the topic doesn’t display the content to which the tag applies. The color of the diagonal hashing differentiates tagged areas. For a folder, no hash marks appear. You can display hash marks for topics inside a folder.

Notes:

  • Remove text references to excluded topics, such as links. Hotspots are not active for excluded topics.

  • You can apply a conditional build tag to topics in the TOC pod.

  • Show or hide conditional text by choosing View > Show > Conditional Areas.

Verifying tags applied to topics

The Used area of the Conditional Build Tag Properties dialog box lists the topics using a tag. The Level column shows how a tag is applied:

<Topic>
Applied to a topic.

<Content>
Applied to topic content.

<Both>
Applied to both topic and content.

The File column lists the file containing the tagged information.

 Right-click a conditional build tag in the Conditional Build Tag pod and click Properties.

Apply conditional build tags to a topic

  1. Select View > Pods > Topic List. Select the topic.

  2. Click Format > Apply Conditional Build Tag, and select a tag.

Apply conditional build tags to multiple topics

  1. Select View > Pods > Topic List.

  2. Select multiple topics.

  3. Click the Properties icon  in the Project toolbar, and then click Advanced.

  4. In the Conditional Build Tags (Topic Level Tags) pod, select a tag. Click OK.

Apply conditional build tags to topic content

  1. Open a topic in the Design Editor.

  2. Select topic content.

  3. Click Format > Apply Conditional Build Tag.

  4. Select a tag and click OK.

Apply multiple conditional tags to topic content

  1. Open a topic in the Design Editor.

  2. Select topic content.

  3. Click Format > Apply Conditional Build Tag > New/Multiple.

  4. Select tags or click Check All. Click OK.

Apply conditional build tags to a folder, index, or TOC

  1. Do one of the following:

    • To apply tags to a folder, select a folder in the Project Manager pod.

    • To apply tags to an index, click the Index folder in the Project Manager pod. Select a keyword or subkeyword.

    • To apply tags to a TOC, click the Table of Contents folder in the Project Manager pod. Select a book or a page. If you apply tags to the entire TOC, the TOC is unavailable in the output. If you apply them only to pages in the TOC, the TOC is available. The tagged pages are not.

  2. Click Format > Apply Conditional Build Tag > New/Multiple.

  3. Select tags or click Check All. Click OK.

Apply conditional build tags to placeholders

 Do one of the following:
  • Select a placeholder placed in a master page and select Format > Apply Conditional Build Tag > [new tag].

  • Right-click a placeholder in the master page and select Apply Conditional Build Tag > [new tag].

Note: You can apply conditional build tags on snippet instances as well but not on snippets.

Preview conditional text areas

To check the format of a topic with a conditional text area, preview it using a conditional build tag expression you have already defined. You can also define a conditional build tag expression while previewing the topic.

  1. Open a topic in the Design Editor.

  2. Select View > View Item.

  3. Do one of the following:

    • To preview an existing expression, choose it from the Conditional Build Tag Expression menu.

    • To define and preview a new expression, click Define, and select tags to exclude from the output. Click OK.

To remove the conditional build tag expression from the preview, select None from the Conditional Build Tag Expression menu.

Hide and view conditional text

Items with conditional build tags applied appear in the Design Editor with diagonal hatching in the color specified for the tag.

Conditional text is always visible in the Design Editor, but you can hide the diagonal hatching.

 In View > Show > Conditional Areas, do one of the following:
  • To hide the conditional text, deselect the option.

  • To show the conditional text, select the option.

Remove conditional build tags

  1. Do one of the following:

    • To remove conditional build tags from a topic, select one or more topics in the HTML files folder of the Project Manager pod.

    • To remove conditional build tags from topic content, open a topic in the Design Editor. Select topic content.

    • To remove conditional build tags from a TOC, click in the TOC pod. Select one or more books or pages.

    • To remove conditional build tags from an index, click in the Index pod. Select a keyword or subkeyword.

  2. Click Format > Apply Conditional Build Tag > New/Multiple.

  3. Deselect tags or click Clear All. Then click OK.

  4. To remove conditional build tags from a project, click Project. Expand the Conditional Build Tags folder, click a tag, and select Delete. Then click OK.

    Before removing a conditional build tag from a project, run a project report to determine the topics affected.

Rename conditional build tags

  1. Right-click a tag in the Conditional Build Tags pod.

  2. Select Rename, and enter a new name in the box.

  3. Press Enter. Topics using this tag are updated with the new name.

Make sure that the conditional build expression is updated with the new build tag name before you regenerate the project.