Conditional Content
We provide a very user-friendly way of managing conditional content in the template. We like to think about conditional content as variants of the structures.
To enable section variants start by enabling it in Topol Options:
js
enableSectionVariants: true,
Add structure variant
![Variants Variants](/variants/variants-1.png)
Add condition for certain variant
![Variants Variants](/variants/variants-2.png)
Switch between variants and edit its content
![Variants Variants](/variants/variants-3.png)
Conditions play very nice together with Merge Tag Previews
Condition Syntax
We currently support conditional syntax compatible with Mailchimp and SparkPost.
We are eager to expand our compatibility with additional providers. If you have a specific provider in mind, please reach out to our support team with your request.
You can choose this syntax setting an emailServiceProvider
in Topol Options.
ts
emailServiceProvider: 'mailchimp' | 'sparkpost',