Writing as a self-answered question since it may help others...
I am adding smarty code to a mail template. Including:
{capture assign=designation}{contribution.contribution_source}{/capture}
Later in the page, I call the variable as such:
{if $designation}, for {contribution.contribution_source}{/if}
But the template breaks when I try to use it. The code looks good as far as I can tell. What's the problem?