The Challenge
You want section settings like headlines to support both:- Static copy: “Shop our best sellers”
- Dynamic copy: “Shop [cc-creator-first-name]‘s picks”
The CC Dynamic Text Snippet
Createsnippets/cc-dynamic-text.liquid:
Usage in Sections
Supported Tokens
| Token | With Creator | Without Creator | Notes |
|---|---|---|---|
[cc-creator-first-name] | Sarah | our expert | Most commonly used |
[cc-creator-full-name] | Sarah Jones | our team | For formal contexts |
[cc-creator-discount-code] | SARAH15 | (empty string) | Pair with conditional rendering |
[cc-creator-discount-amount] | 15 | (empty string) | Numeric — add % or $ in your template |
Extending with Custom Tokens
You can extend the snippet to support additional tokens. Common additions:Supporting Custom Fields
For custom fields specific to your merchant program, add additionalreplace lines:
Handling Empty Tokens Gracefully
When a token resolves to empty (e.g., no discount code), the surrounding text might look awkward. Use conditional rendering around the entire element:Example Settings
In your section schema, include info text so merchants know which tokens are available:Related
- Referencing Creator Content — All available creator fields for building custom tokens
- Migrate Existing Sections — Use dynamic text when converting sections