Using Conditions to Unbind Links

In addition to applying condition tags to various content in your project, you may want to use them to unbind links from print-based output, displaying the text only.

Example You are creating both online and PDF output from your project. You might have some content where you have inserted hyperlinks, and you want this content to be included in both the online and PDF output. However, let's say that a particular hyperlink connects to another topic that you are not including in the PDF. When you generate the online output, everything is fine. But when you generate the PDF, an error is displayed in the log because the compiler cannot find the topic referenced in the hyperlink.

The way to avoid seeing the error (and to avoid users experiencing a broken link in the output) is to apply a condition tag (e.g., "OnlineOnly") to the hyperlink and select the option in the dialog to unbind the link. If you then exclude that condition tag from your print target, you will still see the hyperlink text in the PDF, but the link will be removed. Therefore, you will no longer receive an error and the link will not be broken.

How to Use a Condition to Unbind a Link

  1. Open the content file.
  2. Make sure the span bars are visible at the top of the XML Editor. If they are not, click Show Spans button in the local toolbar at the bottom of the editor to show them (see Structure Bars).
  3. Right-click on the span bar above the topic that corresponds with the link.

    Note If you first click on the link in the topic, the corresponding span bar is highlighted above. For hypertext links, the span bar is labeled "a." For cross-references, the span bar is labeled "MadCap:xref."

  4. In the context menu, select Conditions. The Condition Tags dialog opens, with the first condition tag set selected and the associated condition tags shown on the right.
  5. If you want to see condition tags for a different condition tag set, select it.
  6. Click the check box next to the tags where you want the hyperlink to remain. A check mark appears in the box.
  7. In the Exclude Action section, select Unbind.

    In other words, you are telling Flare Desktop this: Keep the hyperlink in the targets that are associated with the tags that I selected. For the targets not associated with those tags, get rid of the hyperlink, but do not remove the text.

    On the other hand, if you had selected the "Remove" option, you would have been telling Flare Desktop this: Keep the hyperlink in the targets that are associated with the tags that I selected. For the targets not associated with those tags, remove both the hyperlink and the text.

  8. Click OK.
  9. Click Save the active file. to save your work.