So I'm super close to getting a smarty variable working to place the contribution note in a thank you letter.
I used the API explorer and got this far:
{crmAPI var='result' entity='Note' action='get' sequential=0 entity_table="civicrm_contribution" entity_id=$contribution.contribution_id}
{foreach from=$result.values item=note}
{$note.note}
{/foreach}
But this prints a list of all contribution notes in the database, it doesn't filter out by the contribution ID. I know that the variable contribution.contribution_id works in the thank you letter as a standalone variable. I also can use the above code and substitute entity_id=1
and that does print the note attached to contribution 1.
How can I put a smarty variable inside the smarty variable api call??
(Wordpress 4.3.2 and Civi 4.6.4)