if else statement in template

Hey Neil,

Mine is a different scenario and thus syntax but it may help? This is what I have and it works:

{% set createDate = '[CREATED_AT]' %} {% if createDate is defined and createDate %} in {{ createDate | date("F Y") }} {% else %} some time ago {% endif %}

Maybe try this or even just try single = instead of ==

I am not an expert but the above works, hope it helps you.
 
{% IF FNAME|LOWER == 'Neil' %}Yes It's Neil{% ENDIF %}{{FNAME}}
This will compare neil to Neil and these are not equal.
Most likely your statement should be:
Code:
{% if FNAME|lower == 'neil' %}Yes It's Neil{% endif %}{{FNAME}}
Case sensitivity matters.
 
Back
Top