Menu

Snippet Templates

Updated: 2021-01-08

Snippets allow you to insert a piece of template code into another template. This is an easy way to share template content that you use in more than one place. Use the Template Editor to create, edit and use snippets.

Built-in Letterhead, Address, Salutation, and Closing Snippets

In order to allow you to customize the letterhead, salutation, address and the closing signature of all templates and still get the latest body from the built-in templates, we have created snippets. These snippets mean you don't need to edit every template in which these details appear, you can just clone and edit the snippet to have it apply across templates.

  • All built-in templates use Letterhead and Closing snippets (if needed) to insert the letterhead and signature in each template. The Letterhead and Closing snippets automatically use the image files you set in Options to add a signature and logo. See the Modify Your Letterhead help topic.
  • The Address snippet inserts the taxpayer's address wherever it is needed.
  • The Salutation snippets for client (CSalutation), joint (JSalutation), family (FSalutation) and deceased letters (DSalutation). Edit these to change the way you address the beginning of the letters. The Salutation snippets refer to the Address snippet.
  • TaxCycle T1 templates include snippets for Québec TP1 filing and refund/balance owing sections.

Customizing Built-in Snippets

  1. In the Templates sidebar, find and open the built-in Letterhead snippet for the module and year you are working on.
  2. Clone the snippet so that that replaces the built-in snippet. (See the Clone a Template help topic.)
    Screen Capture: Clone a Snippet
  3. The first time you clone a snippet it replaces the built-in template of the same name. If you clone it a second time, it will not replace the built-in snippet.
  4. Edit the code until it looks as you want it. (To remove the entire existing letterhead, press Ctrl+A to select all, then press Delete.)
  5. Preview and test just your snippet as you would any other template. (Learn more in the Template Editor help topic.) Preview and test the snippet again with a built-in letter or invoice to make sure it works correctly once inserted.
    Screen Capture: Edit a Snippet

Using Snippets in Templates

While TaxCycle has built-in snippets to help with letterheads and closing statements, you can also create your own snippets to insert anywhere for sharing frequently-used content. Here's how to insert a snippet in a template.

  1. Click New to start a new template and check the years and modules to which the snippet will apply.
  2. (See Create a New Template help topic.)
  3. In the Properties sidebar, enter a Name and Description. (See the Template Properties help topic.)
  4. Select Snippet as the Type.
  5. Add content to the snippet and preview/test the snippet as you normally would any other template.
  6. Go to the template in which you wish to use the snippet, and enter the code to refer to the snippet: In between double braces {{ }} (curly brackets), enter a greater-than symbol > and then the name of the snippet template. For example, to insert the snippet into a template, use the code: {{> CSalutation }}
    Screen Capture: Referring to a Snippet

Take care to test well if you created snippet across tax modules, as only some field codes are common between T1 and T2, for example. Most field codes are consistent between different years of tax modules, but you may need to create a snippet for each type of tax return if they contain content specific to that module.