I know that sticking in a contact-related custom field to the invoice template is just "contact.custom_xx" (where xx = custom field id).
We're trying to do the same for a Contribution-related custom field, but the syntax:
contribute.custom_xx or contribution.custom_xx is not working.
Any suggestions?