Hi! It’s Kelly again, with another edition of Flare 101.

Chances are good that there will be some information in your Flare project that you want to use over and over again. If it’s just a little bit of information (like a phone number), you’d use a variable instead of entering the information every single time you want it to appear in your work. If there’s a lot of information you’d like to use over and over again (text, tables, pictures, and whatever else can be included in a normal topic) you can use a snippet.

When you master the art of using snippets and variables, your life will become much easier. This post will show you the simplest, most straightforward ways to get started.


When you want to add a variable, you first need to have a variable set. What’s a variable set? Well, it’s a set of variables. Pretty self-explanatory, huh? Here’s how to create variables:

  1. In the Project Organizer, double-click the Variables folder.
  2. Flare will usually give you a variable set, so double-click it. If you don’t have any variable sets in the folder, you can add one by clicking Project, New, and choosing Variable Set. Click add and OK, and the Variable Set Editor will open up. Flare provides you with a couple of variables (CompanyName and PhoneNumber) but you can delete or modify them if you want. variable_set_editor
  3. If you want to add a variable, click add page in the local toolbar.
  4. Double-click in a field and type the name, then do the same for the definition, and comment.
  5. Save it!

Now you’ll want to insert your variables into your topics. Here’s how to do it:

  1. Open your topic and place your cursor where you want to add a variable.
  2. From the local toolbar, click variable. The Variables dialog will open, with your variable sets on the left and the variables in those sets on the right. variables_dialog
  3. On the left, select the variable set you want to use.
  4. On the right, select the variable from that set that you want to insert and click OK.
  5. Save it!


There are two ways to make snippets: out of existing content, and from scratch. If you already have some content in your topic that you want to turn into a snippet, here’s how to do it:

  1. Open the topic and highlight the content (this can be text, tables, pictures, whatever you want) that you want to turn into a snippet.
  2. In the Home ribbon, go to the Snippet section and select Create Snippet.create_snippet
  3. Choose a name for your snippet and type it in the Snippet File field. If you leave the project folder selection as “Resources/Snippets” that’s where you’ll be able to find your snippets in the Content Explorer (and that’s a great place for them to live).
  4. Click Create and save it!

Here’s how to make a snippet from scratch:

  1. Do one of the following, depending on the part of the user interface you are using. In the Content section of the Project ribbon, select New>Snippet and the Add File dialog will open.
  2. In the Source area, select New from template (because we’re doing this the quick and easy way) and choose one of Flare’s Factory Templates.
  3. In the File Name field, type a new name for the snippet and click Add.
  4. When the Copy to Project dialog opens, click OK. The snippet is added to the Content Explorer and opens in its own page in the XML Editor.newsnippet
  5. Click inside the snippet page in the XML Editor and add whatever content you want to include in your snippet. When you’re done, save it!

Now you’ll want to insert your snippets into your topics. Here’s how to do it:

  1. Open your topic and place your cursor where you want to add a variable.
  2. From the local toolbar, click snippet. insert_snippet
  3. In the Insert Snippet Link dialog that pops up, select a snippet file to insert. Click OK and save it!

Now go write!

Hey, Kelly! I want to know more!

I have questions!

About The Author

Kelly K.

About Kelly K.

Guest Blogger: Kelly is new to MadCap Flare and is sharing her experience as she learns to use the software.

Last Modified: September 11, 2014

This entry was posted in Flare 101, MadCap Flare. Bookmark the permalink.


  • Kevin April 9, 2014 at 3:34 AM

    Thanks for the interesting post, Kelly. One thing which always trips me up when inserting variables is that you need to select them with the mouse. Being a habitual keyboard-shortcut user, I reflexively try to select a variable from the list and then hit Enter. Instead of the desired result, the arrows move you up and down through the list of variable sets, and Enter inserts whatever variable happens to be highlighted at the time. You might expect that hitting Tab or right arrow would enable you to move over to the list of variables, but this is not the case. The only apparent way to put the list of variables into focus is by using the mouse. 🙁 Feature request, anyone?

  • craig wright February 13, 2015 at 3:03 AM

    Actually, there are times where you need to use a snippet for small bits of info like phone numbers too. For example, if you want Contributor users to be able to change phone numbers, you would need snippets as they cannot change variables, whereas they can change snippets. This is an important thing to note on projects with huge lists of phone numbers that are managed by lots of different people.

  • Lasse Ronnenberg August 21, 2018 at 5:57 AM

    Variable Conditions are giving me so much trouble!

    I should be able to insert ONLY ONE variable named “Document_Type” on the front page. This variable should then switch between “User Manual” and “Installation Manual” based on a condition.

    Instead, I have to:

    A. Create a complete dataset for every single document type.
    B. Add a variable named “Document_Type” to each data set.
    C. Add the “Document_Type” variable from each of the data set to my front page.
    D. Edit each added variable and add the conditional = Only show the Document_Type variable for “Installation Guide” if the Target fulfills the condition “Installation Guide”.

    The result is a front page that contains the variable “Document_Type” embedded over and over again with different colors based on which conditions must be fulfilled.

    Do you guys even know what “variable” means? It means I should be able to write “Product_Type”, and then the ‘translation’ should be selected from the dataset that fulfills the condition: “Installation Manual dataset”.

    If there is any easier way to do this, PLEASE let me know!

    • Rachel Kim Rachel Kim August 23, 2018 at 12:58 PM

      Hi Lasse, it sounds like you’re looking for different variable definitions based on the target.

      Instead of having several variable sets and conditioning them out of your front page, you can go into your variable set and add alternate variable definitions. You can then go into your target and specify what variable definition you wants to use for each output. This way, you can have only a single variable set in your project and a single variable pasted on your front page.

      We’ll have a member of our support team reach out directly to help with any further questions!

Have Something to Say?

Your email address will not be published. Required fields are marked *