Condition statement in template

Can you provide the syntax of using the IF condition. Is there way to check if data element is not blank then only show the values.

In our templates we have to display some images only if the image content is available. So we need to check if the data in that field is not blank then display the Image.

If, ELse, Endif, Not, OR syntax which can be used in the template will help.

Thanks in advance.
Sandeep Chheda

Hi Sandeep,

This is the syntax of IF merge tag:

[IF:condition1<>condition2] true content block [ELSE] false content block [ENDIF]

I haven’t tested the image HTML code block implementation to this but this should work:

[IF:%Subscriber:CustomFieldXXX%=Test Value] <img src="http://..."> [ELSE] &nbsp; [ENDIF]

Give it a try, please. By the way, don’t forget to add this if condition merge tag in “HTML Code” mode of the rich text editor.

Hope this helps.

Cem Hurturk