Maximum Number of If Statements for Conditionally Displaying Text?
Do we have a maximum amount of if statements that can be included in an email to conditionally display text? As an example, I have tried 1-5 {{#if}}{{/if}}
statements and they display correctly in the body of the email. Once I exceed 5 (ex/ 6 or 7) {{#if}}{{/if}}
statements , the email no longer displays correctly and all the text appears: {{, }}, #if, {{/if}}.
Best Answer
-
I don't believe there's a hard limit. My guess would be that there's a syntax issue beyond number 5 in your case.
6
Answers
-
@Meghan_160385 You could upvote this enhancement which would be helpful to avoid syntax altogether in the future: https://community.pushbot.com/discussion/789/easy-to-use-conditional-text-display
0 -
The issue ended up being a missing handlebar reference on the 6th if statement, which was causing issues with the output. Thanks @Jeff_146001 - upvoted that enhancement!
0