Variables and Snippets
The Variables and Snippets Plugin allows you to define reusable text variables and Markdown snippets in a central location and integrate them into your content using shortcodes. This plugin can be used with a BUSINESS license.
Use Cases
This plugin is especially useful for:
- Manuals and Documentation: Use variables for frequently changing details like names, prices, or product specifications.
- Content Templates: Create snippets for recurring sections, such as disclaimers, product descriptions, or contact information.
- Dynamic Content Management: Centralize content updates by editing a single variable or snippet, which then updates across all pages.
How It Works
Once activated, you will find a new menu point called "Variables" in the Typemill system. Here you can create, search, update, and delete all variables and snippets.
Variables
A variable is a simple key-value pair. For example, you can define a variable price
with the value $99.99
. Variables are inserted into content using shortcodes like [:variable name="price" :]
.
Snippets
A snippet is a larger block of reusable content written in Markdown. For instance, you could create a snippet contact-info
with your site's address and contact details. Snippets are inserted using shortcodes like [:snippet name="contact-info" :]
.