I just can't seem to get any conditional statement to work using Smarty. Essentially, the logic should say, 'if the contribution is Membership Dues, say this. If it's a Donation, say this'.
I'm using other Smarty content in the template and it works fine, but as soon as I add the 'if' statement I get a fatal error.
Here's what I currently have:
{capture assign=contribution_type}{contribution.financial_type_id}{/capture} {if "$contribution_type" == "1"}This is for Membership. {else}This is for Donation. {/if}
Things I've tried:
- Set CKeditor - Entities =True
- Every variations of wrapping field and value in "" or '' or nothing.
- adding {} around the field e.g. {$contribution_type}, with and without single and double quotes.
- with and without the $
Am I missing something obvious or misunderstanding altogether?
Wordpress: 6.1.1 CiviCRM: 5.55.2
Much thanks in advance for any insight.