Data Helpers

What is a Data Helper?

A Data Helper is used when creating templates, such as email and letter templates. A Data Helper can be used to output custom content based on the data of a matter.

Example

If a matter has a custom field called "Is there a referral arrangement?" and this has the data marker of 'referral.arrangement`. See below how this can be used with an '#if' condition:

{{#if referral.arrangement}} 
     This text is output if there is a referral arrangement.
{{#else}}
     This test is output if there is not a referral arrangement.
{{#endif}

Key points about data helpers:

  • They always start with a #
  • They can be written in lowercase or uppercase.
  • They are always encased within two curly braces that specify the start and end of the helper.
  • Each helper is custom and can perform different calculations and/or create different outputs.

List of Helpers

Helper Description
#datetime
Outputs dates and times in a format you wish, including today's date.
#if, #else, #endif
A conditional clause used to change what happens An #if must be closed with an #endif.
#foreach, #endforeach
The #foreach helper is used to run through a list of data. Inside a #foreach you can reference specific data within a list. Used in invoices and fee tables.
#lowercase, #uppercase, #titlecase
Forces the output to be in a certain case.
#trim Removes all leading and trailing white-space characters from the input.
#calc
Allows calculations to be undertaken during the templating process
#uksdlt
A helper to calculate UK SDLT and Welsh LTT

Still need help? Contact Us Contact Us