Editing Variables
Variables contain short pieces of information that appear throughout a project, like your company name, website, and product name. You can create variables for just about anything. Variables work sort of like snippets: you can use them throughout your project, and when you make a change to them, the changes will appear anywhere you used the variable. This makes variables a great option for information that might change frequently, such as dates or version numbers.
When you use the San Diego template, Flare Desktop automatically adds a few standard variables to your project. Let's edit some of these variables so our finished project will be a little less generic.
How to Edit a Variable
Up to this point, we have been working with resources that are stored in the Content Explorer. Variables are a project resource, so they are located in the Project Organizer.
- On the left side of Flare Desktop, open the Project Organizer.
- Expand the Variables folder.
-
Double-click the General variable set. The Variable Set Editor opens to the right.
Look at the different variables in this project. There are variables for the company name, street address (including a separate variable for the city, state, and zip code), phone number, website, and current year. There is also a variable for the title of the PDF guide.
The name of each variable appears in the Name column. The content that will appear in the output wherever the variable is used appears in the Definition column. Let's edit some of the variable definitions.
-
In the Definition column, double-click My Company, LLC. In the field, enter the name of your company and press ENTER.
-
(Optional) In the Definition column, double-click and change the definition for any other variables that you want to customize.
Note You might have noticed that the Year variable has a slightly different icon, which uses a clock
. This indicates that it is a Date/Time variable, which uses format specifiers to represent the date or time. The Year variable uses the format "yyyy" to represent the current year (in 4-digit format).
For more information about how to format and use Date/Time variables, see Creating Custom Date/Time Variables.
-
Click
to save your work.
Example After you finish renaming variables, you can look at them in a content file (topic, snippet, template page, page layout). Open the Content Explorer, then expand Resources > TemplatePages folder. Double-click Home-Page.flmsp.
All of the gray highlighted fields on this page are variables. Using the Show Tags drop-down field in the local toolbar of the XML Editor, you can adjust your markers to display inserted variables in different ways (e.g., show/hide the variable name in the editor).
If you were to edit the variables again, and then come back to this file, you would see the updated information.