Troubleshooting Conditionals
When experiencing problems with conditionals, you may use these questions to help you determine the problem.
1) Are you using conditionals in a manner explicitly given in the User Guide?
2) When using custom fields in conditionals, are you trying to use it as a variable?
Correct:
{if custom_field == "foo"}
Incorrect:
{if {custom_field} == "foo"}
3) If testing multiple values, are you using full expressions for each?
Correct:
{if custom_field == "foo" OR custom_field == "bar"}
Incorrect:
{if custom_field == "foo|bar"}
4) Are you attempting to use a conditional to determine which opening tag to use for a tagblock? Please refer to the Knowledge-Blog article on Tags Within Advanced Conditionals.
5) Does the item you are comparing contain a converted or removed character? From the Conditional Global Variables page of the User Guide, the following characters are converted or removed:
” => "
$ => $
( => (
) => )
{ => removed
} => removed
6) Are you comparing a quoted variable to a value? This is not supported and depending on the source of the variable, may even have security implications. By doing this, you are allowing the tag that “owns” that variable to parse and replace it with its unfiltered contents. Doing so is trusting that it has no bad characters, no javascript, and no need for error checking that is normally performed when the conditional is used with the proper syntax outline above.
Unsupported, possible security risk:
{if "{custom_field}" == "foo"}
Category: Templates, Other, Technical Issues, Troubleshooting
