Using variables is the main method for outputting data. You can create custom variables in the following ways:
String variable
{% set customVariable1 = 'String' %}
Calling a string variable:
{{customVariable1}}
Result: String
String variable with multiple values
{% set customVariable3 = { var1: 'string1'; var2: 'string2' } %}
Calling one of the values of a variable with multiple values:
{{customVariable3.var1}}
Result: string1
Numeric variable
{% set customVariable2 = 4 %}
Calling a numeric variable:
{{customVariable2}}
Result: 4
Variables in the VCE editor
This is what you see in the VCE editor when adding the given variables:
This is what you can see in the Contact Preview, so what your users see:
You can also create a variable containing an entire block of code:
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td>
{{customBlockVariable}}
</td>
</tr>
</table>
Result:
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
This variable is equal to this entire block of code!
</td>
</tr>
</table>
</td>
</tr>
</table>