A global variable is a placeholder that you can refer to in the text of your MindTouch page. You set the value of the variable, and when readers view the page, they see the value of the variable instead of the variable itself. When you change the value of the variable, all references to that variable in the text are automatically updated. You can use global variables and classifications in MindTouch. See our documentation on setting up global variables.
Benefits of using variables
When you use this feature, you gain the ability to manage information that may not be related to the subject of the article, but that supports and describes the article itself.
When to use global variables
Use global variables when important information might change over time. For example, you might use a global variable for the following:
- A feature name that has not yet been approved. You can write content about the feature and insert the variable in place of the feature name. Once the name is approved, you can set the value of the global variable and the approved name will appear throughout the document wherever the variable was included.
- A version number. When you release a new version and keep the legacy content that is still relevant to the new version, you can update the global variable with the new number to update the version number throughout the legacy content.
- A copyright date. You can update copyright dates throughout the document set all at once by using a global variable.
Although a global variable value is updated on a page, it is not searchable until the page is minimally edited and saved. If you need MindTouch to return results when searching for the new value, you must edit and then save the page to refresh the index (even a slight modification like adding a space is sufficient). If a page is not minimally edited and saved, the search index will continue to cache the pages with the old variable content.
You use classifications to capture information about an article. You set the value of the classification for each article so that content creators understand the condition of the article. By default, these classifications are delivered with your MindTouch account:
A classification makes it easy to limit the list of values the user can choose to tag a page. You might use this information:
- To create custom tabs for the tabbed navigation tool that appears on articles with the Article Type of Category. See creating custom tabs.
- As part of a document workflow. For example, you might run a report of all articles where the Stage classification is set to Stub every week to create a to-do list.
- While localizing content. You can use the Classifications Manager to find all of the articles that are ready to be sent for translation, then update the classification for all of the articles once they have been sent to the translation vendor.