Documentation Center

Setting a condition on a topic or map in Draft Space

You can set conditions on complete topics or even child maps of a parent map so that they are included or excluded in the published output. To do this, you need to define the condition within the parent map to the link to the topic or child map (as opposed to applying the condition to the topic or child map itself).

Before you begin

The condition names and values that are available must have been defined by your publication or project manager.

Procedure

  1. Open the document in Draft Space.
  2. Open the document's Outline.
  3. In the outline, right-click on the topic or map that you want to be conditional.
  4. From the menu, select Edit attributes.
    The Attributes pane expands for the selected XML element, which is selected in the drop-down list at the top of the pane.
    • When adding a condition to a topic within a map, the selected element should be a Link to topic.
    • When adding a condition to a child map within a parent map, the selected element should Link to map.
  5. In the Attributes pane, locate the Condition attribute and do one of the following:
    • If you are adding a new condition, click the Add button and then click again on the Condition field.
    • If you are changing an existing condition, there is no Add button and the Condition field displays the current condition. Click on the field.
    Draft Space displays a window where you can select or build a condition. As a convenience, the window displays your most recently used conditions (up to 30 in the current browser).
  6. Depending on the complexity of the condition you need to set, do one of the following:
    Condition complexitySteps

    A condition for a specific predefined value

    Example: Temp = Celcius

    1. From the list of conditions on the left, select the condition name.
    2. From the list of values on the right, select one value.

    A condition for multiple predefined values

    Example: Temp in (Celcius,Fahrenheit,Kelvin)

    1. From the list of conditions on the left, select the condition name.
    2. From the list of values on the right, select all of the values that you want to include.

    A condition relative to an alphanumeric value that you define, including dates

    Examples:
    • A condition for the date is equal to a specific date value.
    • The condition name for product version is set to be between two version numbers.
    1. From the list of conditions on the left, select the condition name.
    2. On the right side of the window, select one of the following options:
      • Equals — an exact value
      • From — a minimum value
      • To — a maximum value*
      • Between — a minimum and a maximum value*

    A condition expression that includes multiple condition name-value pairs

    Complex expressions can include the following:

    • the logical operators AND the OR
    • parentheses to group parts of the expression and define the order in which they should be evaluated
    1. Click Advanced mode at the top of the window.
    2. In the New condition field, define your complex condition. You can use the following methods:
      • Select a condition name and value(s) to create a simple condition and then use the Copy condition button to copy it to your clipboard. Paste the condition into the New condition field using Ctrl + V.
      • Select any condition expression that appears in the Recently used list and then copy and paste it into the New condition field.
      • Manually type in the field to add logical operators and parentheses.

      You can repeat copy-paste actions as many times as needed to build your complex expression.

  7. When you have the full condition defined, click Apply.
  8. Save your changes to the document.

Results

Draft Space shows a preview of the new conditional settings. Topics and maps that will be excluded appear in Draft Space as follows:
  • In the outline, the component's name is struck through.
  • In the content area, the text "Excluded" appears in the component's top margin.

Keep in mind that the preview is based on the current condition context of the document. If you view the same content with a different condition context, the highlighting changes accordingly.

What to do next

Verify that the conditional content appears correctly in the various outputs. When the topic is used in multiple documents that have different condition contexts, be sure the output is correct for all the variations.