How to code conditional content in HTML emails Follow

Are you or your designer coding a HTML email where you would like to include conditional content? Below are some examples of how to use the conditional content when coding your HTML email.

Examples

%%General:HAS%%
The database has a field called "General", and the contact's value is not blank
%%General:ELSE%%
No field, or a blank value
%%General:END%%

%%General:EXACTLY:Business%%
The database has a field called "General", and the contact's value is equal to "Business"
%%General:END%%

%%General:CONTAINS:Business%%
The database has a field called "General", and the contact's value contains the string "Business"
%%General:END%%

%%General:GREATERTHAN:1%%
The database has a field called "General", and the contact's value is greater than 1
%%General:END%%

Operations which can be used

  • has
  • hasnot
  • contains
  • exactly
  • notexactly
  • greaterthan
  • lessthan
  • 'else' operations can be used with any conditional statement, as shown in the above example


Did this article help? Hit the thumbs up icon below.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request