home

Browse documentation

ezyVet Knowledge Center

Get access to documentation, training, and other high-quality resources.

Twig template variables: Addresses

The address variables show the parts of an address (for example, the street lines and the country). Use the address variables after a variable that shows an address (for example, contact.PostalAddress).

You can use the address variables after:

  • contact.PostalAddress
  • contact.PhysicalAddress
  • department.PhysicalAddress
  • Each address in contact.Addresses

The variable before the address variable selects the address. For example, Street1 shows the first street line of the postal address or of the physical address.

Example:

Postal address: {{ contact.PostalAddress.Street1 }}
Physical address: {{ contact.PhysicalAddress.Street1 }}

In this example:

  • contact.PostalAddress.Street1 shows the first street line of the postal address of the contact record.
  • contact.PhysicalAddress.Street1 shows the first street line of the physical address of the contact record.
RecordThe document shows
Mr Lister, Dave. The postal address and the physical address are different.Postal address: 3000 Internet Blvd Ste 200

Physical address: 19 Hopetoun Street

Variables that show formatted content

Some of these variables show content with formatting (for example, a table or an address with a line break after each line). Variables of this type show the content in HTML. To show the formatting in the document, use the raw Twig filter. The Function column of each variable of this type has a note about the raw filter.

After the variable name, enter a vertical bar and raw.

Note: If you do not use the raw filter, the document shows the HTML tags as text.

Example:

{{ contact.PostalAddress.AddressHtml|raw }}

In this example:

  • contact.PostalAddress.AddressHtml shows the full address, with a line break after each line.
  • The raw filter shows each line of the address on a new line.

Variables

NameClassic template system equivalent?Function
{{ contact.PostalAddress.Street1 }}NoShows the first street line of the address.
{{ contact.PostalAddress.Street2 }}NoShows the second street line of the address.
{{ contact.PostalAddress.CountryName }}NoShows the name of the country of the address.
{{ contact.PostalAddress.AddressHtml }}NoShows the full address, with a line break after each line.
Note: Use this variable with the raw Twig filter. Refer to Variables that show formatted content.
{{ contact.PostalAddress.Name }}NoShows the name of the address.
{{ contact.PostalAddress.Contact }}NoShows the contact record that is related to the address.
Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.PostalAddress.Contact.Name }}.