enfr

Template Editor

Updated: 2017-01-30

The Template Editor helps you to edit letter, invoice, snippetlabel, and email templates that come with TaxCycle. Or, you can create completely new templates from scratch.

To get an overview of what you can do with the Template Editor, we suggest watching our two-part webinar series. See the Video: Template Editor page to watch these videos.

Correspondence section in the TaxCycle Prepare sidebarBuilt-in templates

TaxCycle comes with built-in templates for all its tax modules. You can use these templates as a basis for creating your own templates. They cannot be deleted and you can always revert to these templates.

You can find most of these these in the Prepare sidebar, under the Correspondence section (see image on right).

Each tax module has its own set of default templates that look at the data in the client tax return and to customize the message for each client. These include the templates for letters, emails, invoices and labels.

Even if you never edit a template, you can use these built-in templates. And, you can add your signature and logo to them, by pointing to them in Options. Read the Signature and logo help topic to learn how to do this.

You can also personalize any piece of correspondence to just one client. Read the Personalizing a letter help topic to learn how to do this.

Opening the Template Editor

There are several ways to open the Template Editor:

  1. From the Start screen, click Template Editor in the blue bar on the left. 
  2. If you have a file open in TaxCycle, go to the Tools menu and click Template Editor.
  3. If you are viewing a letter, invoice, email, or label in an open TaxCycle file, right-click on it and choose Edit template.

It can save time to first open tax return for the year and module you of the template you wish to edit, before opening the Template Editor. (However, it is always possible to come back and open a test file later.)

How to start the Template Editor

The Template Editor window

  1. The sidebar on the left side of the window contains tabs that allow you select Templates to edit, set Properties for the template you are currently editing, and choose a file with data to Preview the results of your template.
  2. After you select a template in the Templates sidebar, the source code appears on the left side of the window, if you are using the default Side Preview view (or at the top in the Bottom Preview view—change this using the buttons in the menu).
  3. In the Preview sidebar, choose a taxpayer to preview the changes. A preview of the final layout and data appears on the right side of the window, if you are using the default Side Preview view (or at the bottom in the Bottom Preview view—change this using the buttons in the menu).
    template-editor-window636177657289909823

Working on smaller screens

On larger screens, maximize the window to make it easier to preview your changes. On smaller screens, it is possible to change the layout and view to help you see more:

  1. Click the pin to unpin the sidebar so it disappears when you move your mouse away from it. You can then hover over the sidebar to make it appear temporarily. Click it again to keep it open all the time.
  2. Click the arrow button to move the sidebar to the other side of the window.
  3. Click the up arrow on the far right of the menu to collapse the menu. Hover over the Home tab to open it briefly. Click the down arrow to keep it open all the time.
  4. Change the view of the Preview:
    1. Click Hide Preview to only see the template code on screen.
    2. Click Show Side Preview to put the preview on the far right (this is the default).
    3. Click Show Bottom Preview to put the preview at the bottom of the screen.

Pin or unpin the sidebar

Change the preview of the template

Modifying a built-in template

  1. In the Templates sidebar, click on the name of the template you wish to modify. (Or, if you are viewing a template in a TaxCycle tax return, right-click on it and select Edit template to open the template editor and and the template.) 
  2. To change a built-in template, you must first clone it in one of the following ways:
    1. Click the clone link in the pink bar at the top of the window.
    2. Click the clone button to the right of the name of the template in the sidebar.
    3. Click the Clone Template button in the Home menu.
    How to clone a built-in template
    This creates a copy of the template that is open for editing and sets it to replace the original template. For example, if you clone the T1 2016 CLetter template this way, it creates a copy of the template for you to edit, but it still replaces the default CLetter in every TaxCycle file and in Print Sets when you print a return.
  3. When you clone a built-in template, TaxCycle creates a copy and automatically selects it in the list on the Templates sidebar. You can tell this copy from the built-in templates because the name appears in bold.
  4. If you're editing a template and haven't yet saved your changes, an asterisk appears next to the template in the list. 
  5. Right-click any cloned or custom template to delete it. You cannot delete built-in templates.
    Cloned templates in the sidebar 
  6. The first template you clone will replace the original template. In the Properties sidebar, you will see the name of the template it replaces.
  7. Select Nothing - unique template (or click the make unique link) in the Properties sidebar to have it appear as a separate entry in a TaxCycle tax return.
    Replaces field in the Properties sidebar
  8. Click the Save button or press Ctrl+S to save the template to the default templates folder you have set in options. TaxCycle then uses this copy in place of the built-in template.

Creating a new template

You can start with a blank template and then add content to it. A blank template can also be useful if you are trying out a condition and want to see whether it works before you insert it into a letter.

  1. Click New to start a new template.
  2. Check the years and modules to which the template will apply, and click OK.
  3. Complete the details in the Properties sidebar (see below).
  4. Add content to the template (this can include field code, constants and conditions). 
  5. Click the Save button or press Ctrl+S to save the template to the default templates folder you have set in options
  6. Preview and test the template (see below).

new-template

Setting template properties

Click the Properties tab in the sidebar to see and adjust the metadata related to the current template. The following shows the options available to you.

Set the properties for a template

1.

Name
All template types

The short name of the document. It appears in the Prepare sidebar and is searchable from F4 Fast Find.

2.

Description
All template types

Long description of the document. It appears in the Prepare sidebar and is searchable from F4 Fast Find.

3. Culture
All template types
The language—English or French—of the template. Also defines the way dates and currency are formatted to match conventions for the language. 
4.

Module
All template types

The modules and years to which the template applies. Click the link to select the tax return and year to which the template applies. You can use this to apply a template to multiple years.

5. Replaces
All template types
The built-in template which this template replaces. Choose Nothing - unique template or click the make unique link to make the template appear separately in the Prepare sidebar. If you make a unique template, be sure to add it to Print sets if required.
6.

Type
All template types

  • Letter—Available from the Correspondence section of the Prepare sidebar list and in F4 Fast Find. Can be emailed directly from the Prepare sidebar.
  • Email—Available from the Save to/Email drop-down list in printer/output settings for Adobe PDF and Microsoft XPS formats. Used to create a cover email for a printed document. Learn more in the Email templates help topic.
  • Invoice—Created from the information on the Billing worksheet in TaxCycle T1. Available from the Correspondence section of the Prepare sidebar list and in F4 Fast Find. Can be emailed directly from the Prepare sidebar.
  • Label—Used for printing to desktop label printer, such as the Brother QL-570 and the Dymo Turbo 450, or in batch label printing. Learn more in the Label templates help topic.
  • Snippet—Used to insert a piece of template code into one or more other templates. For example, the built-in Letterhead and Closing snippets. Learn more in the Snippets help topic.
7. Subject
Letters, invoices and labels
Provides the subject text for a cover email (for example ClientCopyEmail in TaxCycle T1) or when you use any template as an email (by clicking the envelope button when you hover next to the template name in the Prepare sidebar).
8. Margins
Letters, invoices and labels

Margins for all pages of the document. Useful for adjusting layout on printed templates like the T7DR(A).

All margins are specified in inches, using a decimal value. 

In general, adjust the left and right margins here instead of using the ruler in the edit pane. This makes sure they apply to the entire document, rather than only to the currently-selected paragraph.

9. Used
Letters, invoices and labels

Condition for when the template is selected as "Used" in the forms list (has blue lines in the form icon) and for printing. 

A value of true means it is always considered used. A value of false means it is never considered used. Other instances are conditional based on information in the file. 

For example, the ISlips template has a condition that considers it used only if the current client has incomplete slips.

10. Relevant
Letters, invoices and labels

Condition for when the template appears in the forms list or is available in F4 Fast Find. 

A value of true means you can search for the form in F4 Fast Find and will always see it in the forms list. A value of false means it is unsearchable and invisible.

For example, JLetter has a relevant condition that has it only display in the forms list and F4 Fast Find results if the return is coupled.

11.

Label settings
Labels only

  • Width and Height—The size of the label as it appears on the sheet or individual labels.
  • Rotate—Rotates the label when printing, if required.

Editing and formatting content

template-editor-formatting-menu

 

  1. Type text into the edit side of the Template Editor to add your own wording. If you only want to change wording and not field codes or conditions, avoid text between the double braces {{ }} (curly brackets). Inadvertently changing this can break the links to the data in the client file.
  2. Like any word processor, you can adjust the font name, size and colour, or apply bold, underline or italic formatting. Avoid starting or stopping a formatting change in the middle of a set of double braces {{ }}, as partially formatting a field code can break the links to the data in the client file.
  3. Add bulleted and numbered lists or change the paragraph alignment. Click on a paragraph, right-click and select Paragraph to adjust indentation, spacing and paragraph properties. This includes whether the paragraph will break across pages.
  4. Insert a picture into the template. Save any images you use in your templates folder first. Right-click on the image and select More layout options to adjust the position, size and text wrap around an image.
  5. Insert a table into the template, then right-click on the table and select Table Properties to edit the border, shading, padding and more.
  6. Press Ctrl+F to find text within a template. Ctrl+H opens the find and replace boxes. Use this to change "I" to "We" in your templates.
  7. Press Ctrl+Z and Ctrl+Y to undo and redo changes to the template.

Copying field codes

Field codes allow you to pull information from a tax return's data. They are also used to build conditional statements. Use field codes in templates, data monitors and in print set conditions. Field codes used in templates, along with constants and conditions are enclosed in double braces {{ }} (curly brackets).

Right click to copy a field code

Right click on the field and select one of the Copy field code options:

  1. Copy field code puts the code on your clipboard without brackets. For example: CurrentClient.Engage.Preparer.ClientID. Use this in the Data Monitor, as well as in print set and template conditions.
  2. Copy field code with {{curly brackets}} puts the code on your clipboard with the curly brackets. For example: {{CurrentClient.Engage.Preparer.OfficeID}}. Use this format in Templates.

2018-right-click-copy-field-code636808346631937638

Click on the blue bar at the bottom of the window

  1. In an open tax return, place your cursor in the field on a form that you want to insert into the template.
  2. Click the field code link on the left in the blue bar at the bottom of the TaxCycle window. This copies the field code to your clipboard, ready to paste into the template. (Hold down the Ctrl key as you click to copy the field code without the CurrentClient. prefix.)
    Click the hyperlink to put the field code onto your clipboard
  3. Paste the code into the template. For example, {{CurrentClient.Info.ID.FirstName}} will insert the first name of the client (as long as there is a first name in the field).

Learn more about using field codes in the Field codes help topic. For a list of hidden and useful codes that you cannot find on forms, see the Template code help topic.

Adding conditional statements

Conditional statements allow you to include or exclude sections of a template based on whether the condition is met. An easy way to start working with conditions in templates is to find one that does something similar to what you want to do and then edit that condition. Or, ask us for a hand if you want to do something special. 

Here are the basic concepts, although you can learn more in the Conditions help topic.

  1. A condition opens with a field code prefixed with a # (number sign). For example: {{#CurrentClient.Info.ID.Title}}
  2. Close a condition with the {{/end}} tag or a closing version of the opening declaration {{/CurrentClient.Info.ID.Title}}, using a / (forward slash) instead of a # (number sign).
  3. Condition declarations and field codes can include other logic as well. For example:
    • Two field codes separated by and or or will require both or either statements to be matched. 
    • Operators like > (greater than), < (less than), = (equal to) and != (not equal to) also work within these statements.
    • For example, {{#T1Summary.CarryForward.M[1] > 0 or T1Summary.CarryForward.M[2] > 0 }} opens a condition that if either field has a value greater than zero, the content following will display. If both fields are zero, the content is hidden.
    • You can also use parentheses to group statements together and compare them. For example, {{# T1.Income.TotalIncome < 30000 and (Info.Residency.ProvinceDec31="Ontario" or Info.Residency.ProvinceCurrent = "Ontario") }} You may be eligible for special benefits.{{/end}} evaluates whether a taxpayer resides in Ontario, has an address in Ontario and has an income less than $30,000.
  4. Templates also support iterating over multiple slips and dependants to load a list. Examples of this are in the ISlips letter or the JLetter, where you can get a list of slips or repeat the contents of a letter for each taxpayer. Learn more in the Reusable sections help topic.

Preview options in the Template EditorPreview and test your template

To test your changes using real data from a tax return:

  1. Open one or more client files in TaxCycle. These files must match the tax module and year of the template you are working on.
  2. You will also want to consider the data in the files you use for testing. For example:
    • If you have a condition or field code that only shows if you have data in the referenced field, you'll want to make sure there is data in that field.
    • If you want to view information related to spouse or dependants in a letter, make sure the file has spouse or dependant information too.
  3. In the Preview sidebar, click the name of the taxpayer for any open and matching TaxCycle files. 
  4. This uses that client's information to show a preview on the right side of the window, if you are using the default Side Preview view (or at the bottom in the Bottom Preview view—change this using the buttons in the menu).
  5. To test printing of a template, click the Test Print button in the menu.