If Conditionals
Learn the fundamentals on how to write if statements in Parsley.
Parsley provides {{if}}
conditional statements for logic flow.
Checking Equality
When writing if conditionals you can check equality with a single equals character; ==
. Equality can also be inverted with a bang; !=
.
If you're evaluating another Parsley expression including autogenerated fields inside of an if conditional use single curly brackets to wrap your expression. If you are expecting this variable to be a string (this includes ZUIDs) be sure to wrap it in quotes.
If / Else
When writing an if conditional you can also specify an else condition.
If / Else If / Else
You may have multiple conditionals using else if
Last updated