With Snippets Pro, variables let one snippet produce different output from values passed in its {snippet} tag.

Variables are Pro-only. Define them under the snippet's Variables tab before using their placeholders or tag attributes.

Defining variables

Variable KeyThe name used in the placeholder and tag attribute. Spaces and unsupported punctuation are removed when the snippet is saved. The names id, alias, and title are reserved because they identify the snippet.
Default ValueThe configured fallback used when the snippet tag does not pass this variable and the placeholder has no inline fallback.
Insert in TagInclude this variable as an attribute when the editor button inserts the snippet tag.

Only variables defined on the snippet are processed. Adding an arbitrary attribute to a snippet tag does not create a new variable.

Using placeholders

Place a variable key between the configured variable-tag characters. With the default characters, a variable named company is written as:

%company%

Dash and underscore forms address the same defined variable. For example, %company-name% and %company_name% both address a variable saved as company-name.

Passing values

Pass values as attributes of the snippet tag:

{snippet alias="copyright" company="My Company" year="2026"}

A snippet containing:

%year% - %company% - All rights reserved

then outputs:

{snippet alias="copyright" company="My Company" year="2026"}
2026 - My Company - All rights reserved

Fallbacks and precedence

You can put an inline fallback after the variable key:

%company:Regular Labs%

The value is selected in this order:

  1. The attribute supplied in the snippet tag.
  2. The inline fallback in the placeholder.
  3. The Default Value configured for the variable.
  4. An empty value when no value or fallback is available.

An explicitly supplied empty attribute is still a supplied value. For example, company="" outputs nothing and does not use either fallback.

Different placeholders for the same variable can have different inline fallbacks:

%company:Regular Labs% / %company:Unknown company%

Editor-button support

Insert in Tag selects the variables included by the editor button. The optional Variables Fill Wizard lets you enter their values before the tag is inserted. See Editor Button for details.