In this article, we will see :

  • how to format an attribute (1st letter in upper case, etc.)

  • how to put conditions on attributes

For the fields in the text block, it is possible, for example, to integrate a suffix or a prefix. If the field is empty then it will not appear in the template.

Go to the template editor, click the text block and the Content menu.

Select the attribute you want to include in your template and use our magic formulas.

The magic formulas

In order to manage the case of the first and last name, you must capitalize the attributes:

{{Firstname}} {{Lastname}}

will display Thomas DUPONT

{{Firstname}} {{Lastname}}

will display Thomas Smith

To check if one or more attributes are not empty:

{{if firstname}}{{lastname}}{{endif}} {{lastname}}

will be displayed only if first name is not empty.

{{mobile}}{{if mobile and phone}}-{{endif}}{{phone}}

will display '-' between tel and mobile if both are filled.

{{mobile}}{{if mobile or phone}}-{{endif}}{{phone}}

will display '-' between the tel and the mobile if one of them is filled.

{{if empty phone}}04 05 06 07 08{{endif}}

will be displayed only if telephone is empty.

{{if reply}}04 05 06 07 08{endif}}

will be displayed only in the reply signature.

Tip: you can use the attribute's conditions list to help you use these formulas.

See the result in the Preview tab.

Did this answer your question?