Different values assigned to variables used by multiple objects


You can use a single variable in multiple objects and assign different variable values to the objects depending on how they are used.

Example of a variable used in different books

The following example uses three books, and each book reuses the same "Contact Details" topic. The topic includes the <Contact_Name> variable.

The <Contact_Name> variable has been created with three possible values; one of the values, "Joe Bloggs" has been set as the default value. In this example we're going to set the variable value at book level:

  • Book A uses the default value for the <Contact_Name> variable.
  • Book B has the value assigned as Fred Smith.
  • Book C has the value assigned as Jane Brown.

When the books are published, Book A has Joe Bloggs listed as the contact, Book B has Fred Smith listed as the contact, and Book C has Jane Brown listed as the contact.

Alternatively, you can nominate specific topics to be assigned a new variable value, while the rest of the book uses the default variable value.