Our users are always finding great workflow tricks that make their lives easier, and one of the many interesting things that I certainly take advantage of is using Snippets as “seed text”.  This will allow you to reuse snippets when you need to consistently paste a base layer of content that you can convert to text and edit immediately after inserting them.

Doesn’t this go against what a snippet was designed for?

This may be true; however, if you need things like tables set up a certain way, checklists, note or example boxes, forms, etc, you can easily do this in a snippet and drag it to the desired location in a topic, covert it to text and then add your content.

In this sample, we will use a table that was set up to be a checklist:

  1. Copy the files to your computer and unzip them: Seed Snippets
  2. If you do not have a Snippets folder under the Resources folder, create one (right click on the Content folder, select “Create New Folder”, name it Snippets)
  3. Copy the downloaded Seed Snippet folder to a project:
    1. Right-click the Snippets folder in the Content Explorer and select Open Folder in Windows
    2. Copy the Seed Snippets folder into the snippets folder
      Seed Snippets in the Content Explorer

Now you are ready to use the sample snippets as seed text. There are two sample files that contain images.  One is for making checklists and the other is for ‘Caution boxes’.  Both are designed to give you a head start in creating the code structure for the look and feel of the objects, NOT for content reuse as a normal snippet is intended to be used.

  1. Open a topic in the editor (or create a new one)
  2. Create an empty or blank p in the topic to drag the snippet into
  3. Click on the Checklist.flsnp file and drag it to the empty p in the editor

    Notice that what you are seeing is being rendered from the snippet file. If kept like this any edits made to the snippet file will be rendered in any topic that this snippet ‘lines’ in.
  4. Right-click on the Snippet Block and select Convert to Text
    Snippet Content Menu
  5. Notice that after it was converted to text, the code from the snippet has been inserted into the topic.  This code is no longer ‘linked’ to the snippet and will be treated as a part of the topic. You can see this reflected in the block bar.
    Converted Snippet

You can set up as many of these files as you want saving yourself the rework of building complex or frequently used structures over and over again.

Note: All of the formatting for the sample seed snippets provided in this example is inline.  When you create your own, you will most likely want use styles in your CSS.

About The Author

Jose Sermeno

About Jose Sermeno

With over 10 years of experience in the software industry, Mr. Sermeno brings a wealth of knowledge and expertise to the product evangelist team, helping introduce new users to everything MadCap Software. In his spare time, Jose is the Project Director for San Diego City Robotics, the San Diego community college systems robotics program, and enjoys working in software design and open source hardware development. Prior to joining MadCap in late 2010, Jose ran a Drupal development shop, and was an application manager for Temple University Health System.

Last Modified: October 28, 2013

This entry was posted in Flare 101, MadCap Flare, Tech Comm, Tips & Tricks, Tutorials, Uncategorized. Bookmark the permalink.

Comments

  • techwriterkai July 31, 2013 at 11:55 PM

    Yes, this works very well indeed. We’ve been using snippets this way for tables as in the example above, but also for other standard formatted elements such as notes, warnings and hints as you’ve mentioned.

    We’ve found a complementary alternative: When we need few variants, but we need them a lot, we create templates. For example, we have templates for DITA-like topics of types concept, task, and reference. The advantage over snippets is that templates extend control of preset contents to the entire topic, including titles, headings, etc.

Have Something to Say?

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