Adding Snippet Files

You can add a new snippet (without necessarily having any topic open) and then insert the snippet into the topics where you want it to appear.

[Menu Proxy — Headings — Online — Depth3 ]

How to Add a Snippet File

  1. Do one of the following, depending on the part of the user interface you are using:

    • (Recommended) Right-Click In the Content Explorer, right-click on a folder and from the context menu select New > Snippet.

      Tip When adding a new file to the Content Explorer, the recommended method is to right-click on the folder in the Content Explorer and use the New menu option. This is the most efficient way to direct the new file to the folder where you want to store it. That's because the Add File dialog opens when you add a new content file, and this method ensures that the folder you want is already selected in that dialog.

    • Ribbon Select Project > New > Snippet.

    The Add File dialog opens.

  2. In the File Type field at the top, make sure Snippet is selected.
  3. In the Source area, choose to create the new file based on a template or an existing file.
    • New From Template Choose either a factory template file or one of your own custom template files as a starting point. The new file will take on all of the settings contained in the template. If you want to use the factory template provided by Flare, expand the Factory Templates folder and click on a template file. If you want to use your own custom template file, expand the appropriate folder and click on a file. See Templates.
    • New From Existing Choose an existing file of the same type as a starting point for your new file. As with template files, your new file will take on all of the settings contained in the file you select. To use this option, click The browse ellipsis button opens to more options., use the Open File dialog to find a file, and double-click it.
  4. (Optional) The Folder field is automatically populated with the folder that has focus in the Content Explorer. If you want to place the file into a folder that you previously created in the Content Explorer, in the Folder field click The browse ellipsis button opens to more options. and select the subfolder. Otherwise, keep the default location. See Creating Subfolders.

    Note If you want to place non-topic files in a recommended folder, first make sure that folder exists in the Content Explorer. If it does not exist, you can easily add it. See Creating Subfolders.

    Non-Topic File Type

    Recommended Default Folder in Content Explorer

    Branding

    Resources > Branding

    Image

    Resources > Images

    Micro Content

    Resources > MicroContent

    Multimedia

    Resources > Multimedia

    Page Layout

    Resources > PageLayouts

    Snippet

    Resources > Snippets

    Stylesheet

    Resources > Stylesheets

    Table Stylesheet

    Resources > TableStyles

    Template Page

    Resources > TemplatePages

  5. In the File Name field, type a new name for the snippet.
  6. (Optional) If you want to apply condition tags to the file, expand the Attributes section at the bottom of the dialog. Next to the Condition Tags field, click The browse ellipsis button opens to more options. and select the conditions you want to apply. Click OK. See Applying Conditions to Content.
  7. (Optional) If you want to apply file tags, expand the Attributes section at the bottom of the dialog. Next to the File Tags field, click The browse ellipsis button opens to more options. and select the file tags you want to apply. Click OK. See Associating Tags With Files.
  8. Click Add. The snippet is added to the Content Explorer and opens in its own page in the XML Editor with some default text for you.
  9. Now simply click inside the snippet page in the XML Editor and start typing text (replacing the default text shown) or adding any other elements (e.g., styles, tables, images, hyperlinks, multimedia) appropriate for the snippet.
  10. Click Save the active file. to save your work.

Note You can also import an existing snippet from outside your project. See Importing Snippets.

What’s Next?

After you add a new snippet, you can insert it into any topic in your project. See Inserting Snippets.