Editing Templates
File Manager
Editing Media | Editing Stylesheets | Editing Templates
Overview
This article outlines how to edit template files within the CSiDonate File Manager.
For additional information and best practices on receipts, please refer to the Receipts concept page.
Template Samples
Looking for template samples? Check out the E-mail Templates page!
Template Field Reference
The following table lists all possible conditional blocks and replacement tokens, as well as sample values for each.
Token | Use Context | Example Data | Notes |
---|---|---|---|
| Purpose: E-mail Receipt | Do not put replacement tokens in the subject text. Subject tag can be placed anywhere inside the template body. Recommended to put the tag at the top for readability. | |
| Purpose: E-mail Receipt | Johnathan | |
| Purpose: E-mail Receipt | John | |
| Purpose: E-mail Receipt | Smith | |
| Purpose: E-mail Receipt | John A. Smith | |
| Purpose: E-mail Receipt | 123 Main St, Anytown, ZZ | |
| Purpose: E-mail Receipt | (555) 555-1234 | |
| Purpose: E-mail Receipt | jsmith@example.org | |
| Purpose: E-mail Receipt | $50.00 | |
| Purpose: E-mail Receipt | xxxxxxxxxxxx1234 | |
| Purpose: E-mail Receipt | MC | |
| Purpose: E-mail Receipt | General Fund | |
| Purpose: E-mail Receipt | 99999 | |
| Purpose: E-mail Receipt | 3/8/2021 1:30:24 PM | |
| Purpose: E-mail Receipt
| This is a sample gift note. It can contain multiple lines. | |
| Purpose: E-mail Receipt
| $10.95 monthly for 12 occurrences | Update the recurring plan help text that appears on the receipt in the Text and Content area. |
| Purpose: E-mail Receipt
| HON | |
| Purpose: E-mail Receipt
| In honor of | |
| Purpose: E-mail Receipt
| Grandma and Grandpa Smith | |
| Purpose: E-mail Receipt {{#if: tribute}} | Jerry Smith | |
| Purpose: E-mail Receipt
| 456 Main Ave, Sometown, ZZ | |
| Purpose: E-mail Receipt {{#if: tribute}} | jsmith@example.net | |
| Purpose: E-mail Receipt
| Sample Question 1 | |
| Purpose: E-mail Receipt
| Jane | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Smith | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Jones | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Jane A. Smith | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Midwest Alumnae | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Thank you for your consideration! | Only for CROWDFUNDING |
| Purpose: E-mail Receipt
| Thank you for your generous contribution towards my campaign! | Only for CROWDFUNDING |
| Purpose: Tribute Notification | Brenda Smith | Only for CROWDFUNDING |
| Purpose: Tribute Notification | $45.00 | Only for CROWDFUNDING |
| Purpose: Tribute Notification | Johnathan | Only for CROWDFUNDING |
| Purpose: Tribute Notification | John | Only for CROWDFUNDING |
| Purpose: Tribute Notification | John A. Smith | Only for CROWDFUNDING |
| Purpose: Tribute Notification | Smith | Only for CROWDFUNDING |
| Purpose: Tribute Notification | jsmith@example.org | Only for CROWDFUNDING |
| Purpose: Tribute Notification
| Hi Brenda, this gift is in your honor! | Only for CROWDFUNDING |
| Purpose: Tribute Notification
|
| Only for CROWDFUNDING A pre-rendered |
| Purpose: Tribute Notification
|
| Only for CROWDFUNDING The raw URL, for use in your own |
| Purpose: Tribute Notification
| HON | Only for CROWDFUNDING The merge code that the donor selected for this tribute. |
| Purpose: Tribute Notification
| In Honor Of | Only for CROWDFUNDING The description of the merge code that the donor selected. |
| Purpose: Tribute Notification
| in honor of | Only for CROWDFUNDING The description of the merge code that this donor selected, in lower case. Useful for the middle of sentences, e.g. "{{DonorFirstName}} gave {{TribMergeDescriptionLower}} you!" will render as: "Jane gave in honor of you!" |
Conditional Fields
Certain fields must be encapsulated within a conditional block.
A conditional block will only render its contents, if the corresponding data exists. For example, if no gift note was entered, the gift note conditional block will not display.
To define a conditional block, use the following syntax:
{{#if: conditional_name}}
Enter any HTML and/or {{Fields}} here.
{{#endif: conditional_name}}
Refer to the table above for a complete list of conditional statements, in the Use Context column.
Example
Here is an example gift note conditional section including the enclosed HTML.
{{#if: giftnote}}
<h2>Gift Note:</h2>
<p>{{GiftNote}}</p>
{{#endif: giftnote}}
Editing
When editing a receipt, the following properties are available:
File Name: This is the friendly name for your template/receipt. This will be used on the Template page to select this receipt.
Template Purpose: Select the purpose for this template.
E-mail Receipt – Denotes that this template should only be selectable as an e-mail receipt. (See above for a list of fields valid for this purpose.)
CROWDFUNDING Tribute Notification – Denotes that this template should only be selectable as a multiple tribute notification e-mail template. (See above for a list of fields valid for this purpose.)
Unspecified – Only used when importing templates from previous versions of CSiDonate. Do not use this purpose; no other CSiDonate elements can use a template whose purpose is "Unspecified".
Cache Lifetime: See the section on Caching in File Manager.
The HTML template itself can also be edited.