In Part 1 of this blog post, we learned how to manage content with text variables, now we’ll discuss their “rich cousin,” Rich Content Variables.

Rich Content Variables (RCVs) are stored in documents, which means they are more flexible than Text Variables for the following reasons:

  1. Your variables can have styles applied to them. This makes it easy to reuse:
    • Definitions
    • Tables
    • Images or other media
    • Entire topics
  2. You can reuse RCVs created in any source — rich content variables can be created in HTML, XHTML, or Word files and used in any project. (That means you can insert RCVs stored in an XHTML document into a Word document, and vice-versa.)
  3. Rich Content Variables can include text that has been conditionalized.

Real-Life Example

In the Doc-To-Help project, Rich Content Variables are used for the definitions of dialog box fields. The reasons:

  1. Some fields are used in several places within the interface, so many definitions could be reused in several topics.
  2. The definitions often include bulleted lists and tables, so the ability to apply styles is crucial.

Using RCVs was not only efficient (the definitions were written once, and inserted multiple times with no cutting/pasting), they guaranteed accuracy, because no matter how many times the same definition is used, they will all be updated at the same time — none will be accidentally missed.

The RCVs for this project are stored in several files, so that they could be broken up by category. This makes them easy to find when inserting them into the project later.  

Multiple Rich Content Variable files

To create Rich Content Variables:

  1. Open the Variables window. (Project tab > Variables button)
  2. In the Rich Content Variables area, click on the Create New Document button.
    Creating Rich Content Variables
  3. Choose XHTML, HTML, or Word Document from the drop-down list. The Save New Document As dialog box will open. Enter the document Name and click Save to add it to your project. [You can also add an existing variables document. First, copy the document(s) to the appropriate folder in your Doc-To-Help project (the Documents folder of the project).  Then click the Add Existing Documents button.]
  4. Double-click on the document name in the Variables window to open it. The Variables document will have a table with two columns in it.
  5. Enter the variable name in the column on the left (avoid spaces, but other than that — your call), and the variable content in the column on the right. Apply styles as desired, and condititionalize text as needed.
    Rich Context Variable file
  6. Save the document.

Inserting and Importing Rich Context Variables

Rich Content Variables are inserted the same way that Text Variables are, using the Variables button on the Doc-To-Help ribbon (this is how you do it in Word, in the XHTML editor, use the same button on the Insert ribbon.) For full instructions on inserting Variables, see Part 1. You can import RCVs from one project to another exactly the same way you do it for Text Variables (covered in Part 1 also.)

Put on your thinking cap … :-)

Think about your projects — I bet you’ll think of several ways you can use Rich Content Variables (and Text Variables) to manage your content more efficiently. And efficiency and accuracy are what it is all about. Feel free to post your ideas and suggestions below.