Reuse Small Content Snippets

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

In this tutorial, you'll learn how you can reuse small content snippets.

Reusing small content snippets makes it easier to centralize common text elements used in your publication.

Let's pretend you'd like to have the product name and the latest product version displayed at different places in your collection. You might be faced with these two challenges:

  1. You're not yet sure about the exact product name yet or it will likely change in the future;
  2. The version number will have to be kept up to date with the latest release.

Although you could easily solve the above issues with a folder search and replace through your favorite HTML editor, reusable snippets help you address this scenario in a much more flexible manner. Here's how to do it.

Create your content snippets

You first need to create your reusable snippet.

advanced tab screen capture

  1. Navigate to the Advanced tab;
  2. Add the following entries to the Reusable content snippets grid.
Label Content
my_product_name Your product name
my_product_version Your product version

You're now ready to reuse these snippets in your collection.

Manually insert a content snippet

To insert the product name in your documents

  1. Type %my_product_name% (between two % signs, without spaces);(1)
  2. Publish your collection.

You can insert "%my_product_name%" and "%my_product_version%" anywhere you like and manage these entries from a centralized location.

Insert a content snippet through the drop down list

Registered users can also add content snippet tokens from the reusable content drop down list above the editor window.

To add a snippet token to a topic, follow these steps:

  1. Right click on the Snippets drop down list;
  2. From the popup menu, select Collection defined;
  3. From the drop down list, select my_product_name;;
  4. Save and publish your collection.

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

46 / 194