The variables that you create and define in the Variable Set Editor are available to your entire project. However, if you want the definition for a variable to be different in a particular target, you can override the project-level definition for that target in the Target Editor.
- Open the Project Organizer.
- Double-click the Targets folder. The available targets are shown.
- Double-click the target for which you want to override a variable definition. The Target Editor opens to the right, with tabs that you can use to customize that specific target.
- Click the Variables tab. The Variables tab shows all of the variable sets in your project and their associated variables.
- Select the appropriate variable set.
- Do one of the following, depending on whether the variable has only one or multiple definitions in the Variable Set Editor.
For information on adding multiple definitions, see Editing Variables and Editing Date/Time Variables.
- Click to save your work. The alternative variable definition will be used in the output for this target. However, for other targets in your project, the original variable definition will be used.
ExampleS—Different Types of Variable Definitions
Use the examples below to help you determine which type of variable definition you should use.
Original Variable Definitions Used in most cases. These are the variable definitions you enter in the Variable Set Editor. You can enter primary and alternate variable definitions.
Target-Level Variable Definitions Used when generating output for specific targets. Overrides the project-level variable definition, but only for the defined target. For example, if you use a company name variable in your documents, you may want to change it to say "ABC Corporation" in one document and "XYZ Company" in another.
Topic-Level Variable Definitions Used to change a variable definition in a single topic. Applies only to variables in snippets, and overrides project-level and target-level variable definitions. For example, if you use a phone number variable throughout your project, but a handful of topics are about a different location (and therefore use a different phone number), you can set a different variable definition that applies only to those topics.
Snippet-Level Variable Definitions Used to change a variable definition in a single snippet. Applies only to variables in snippets, and overrides project- and target-level variable definitions, as well as topic-level snippet variable definitions. For example, if you use a product name variable throughout your project but a few snippets refer to a different product, you can set a different variable definition that applies only to those snippets.
For more information, see Overriding Variable Definitions in Snippets.
Note: If you preview a topic, the variable definition associated with the primary target is displayed.
Note: If you click the Edit Set button at the bottom of the tab, the Variable Set Editor opens. When you use that editor, you are editing variables for all targets, not those for a specific target or snippet.
Note: You can also override variable definitions for variables in snippets. For more information see Overriding Variable Definitions in Snippets.