Recommendation text placeholders¶
Guide type: Reference Difficulty: Beginner Applies to: Size chart templates and translated content
Some SmartSize size chart templates and instructional blocks include placeholders — special text markers that SmartSize replaces automatically when the chart is shown to shoppers. This reference lists every placeholder, what it does, and where you will see it.
What placeholders are¶
Placeholders are words wrapped in curly braces, such as {petName}. They act as variables that SmartSize fills in at render time based on the context of the size chart.
Placeholders appear in template-generated content. You can also use them when writing custom recommendation or instruction text, as long as the placeholder is supported in that block type.
Available placeholders¶
| Placeholder | Replaced with | Appears in |
|---|---|---|
{petName} |
The localized noun for the pet type, such as dog or cat | Pet boot sizing callouts and how-to-measure steps |
{prefix} |
The audience label, such as Women's or Men's | Default size chart names (generated automatically) |
{garment} |
The garment type, such as Shirts or Pants | Default size chart names (generated automatically) |
{petName}¶
The {petName} placeholder is the most common placeholder merchants encounter. It appears in pet boot sizing templates where the instruction text refers to the shopper's pet.
For example, a template may generate:
"Follow these steps to find the right boot size for your {petName}."
When the chart renders for a dog-products size chart, SmartSize replaces {petName} with the localized word for dog. For cat products, it uses the localized word for cat.
This placeholder is already translated as part of the template system. If you edit the text manually, keep {petName} exactly as written — including the curly braces — so SmartSize can continue to replace it correctly.
Here is how {petName} renders in a few languages:
| Language | Dog | Cat |
|---|---|---|
| English | dog | cat |
| Spanish | perro | gato |
| French | chien | chat |
| German | Hund | Katze |
{prefix} and {garment}¶
These placeholders are used internally when SmartSize generates a default name for a new size chart. For example, selecting Women's and Shirts in the template picker creates a chart named Women's Shirts Size Chart.
You do not typically edit these placeholders directly. They are resolved once when the chart is created, and the resulting name is stored as plain text.
How placeholders are replaced¶
SmartSize replaces placeholders at render time using the chart's context:
- It reads the placeholder name from the text.
- It looks up the matching value from the chart metadata or the localized template strings.
- It substitutes the placeholder with the localized value.
- The shopper sees the final text with no curly braces.
If a placeholder is not recognized, it is left unchanged in the text. This is rare and usually means the placeholder was typed incorrectly.
Placeholders and AI translation¶
When SmartSize AI translates content that contains placeholders, it preserves the placeholder text exactly. The AI translation prompt includes an explicit rule: do not translate text inside curly braces.
This means a pet boot instruction translated into Spanish keeps {petName} as {petName}. SmartSize replaces it with the Spanish word for dog or cat when the chart renders.
Best practices¶
- Keep placeholder names exactly as they appear, including capitalization and curly braces.
- Do not add spaces inside the braces.
- If you copy template text into a custom block, check that any placeholders are still supported in that block type.
- When in doubt, write plain text without placeholders. Placeholders are optional.
- If AI translation produces a translated placeholder name, correct it back to the original English placeholder.