Variable syntax
Before starting to use variables, it is important to understand their syntax. As mentioned in the article "Knowledge base for the use of variables in a newsletter" that I invite you to read, we use the Mustache language to generate the variables in the dashboard.
To use the variables, here is the appropriate syntax to know:
{{variablename }} e.g. {{metadata.title }} or {{day }}, etc.
Some variables allow you to insert HTML code in the template. Therefore, three braces (instead of the usual two) must be put in the opening and closing braces to call an HTML variable e.g. {{{ metadata.image }}} or {{{ metadata.codeHTML }}}, etc.
It is important to understand these notions, even if the template editor is designed so that you don't need to use them since the variables are all accessible from a menu in the text editor.
Create a new variable
If among the variables "global" and "articles", you do not find the one that corresponds to your needs, you can create a new one from the tab "variables" so that it will be available in the tab "Template".
All new variables created manually will be accessible to the edito variables.
To create a new edit variable :
Go to the "Variables" tab
Click on the "Add a variable" button
Name the variable in the window that just appeared on the screen.
Insert the contents of the variable in the black "Value" window.
Save the variable
Changing the value of a variable
Like the previous section of creating a new variable, this step is only available for editorial variables. In other words, it is not possible to modify a global or article variable.
Go to the "Variables" tab
Click on the "Variable" menu
Select the variable you want to change
Make your changes in the "Value" section
Save your changes
Using a variable in the template
For the content of a variable to appear in a newsletter, the variable to which it refers must be added in the newsletter template.
Two methods are available to you:
Use the text editor menu to add a variable (global, article and/or editorial)
Insert directly the link with the Mustache language
Method 1 :
If it is a "Description" or "Title" block:
Insert static text before the variable (this is not mandatory)
In the text editor, choose between "Editorial variables", "Global variables" and "Article variables" (the latter will only be proposed if you have previously selected an "article block").
Click on the variable to embed it in the content
You can insert text before, after or between each variable
Save your change
If it's an image:
The text editor is, of course, only displayed when editing text, so to add variables to images, the principle is the same, but it happens in the right sidebar "Parameters".
Select the image
In the right sidebar "Settings/Image", change the variables for the link or image path
Save your changes
Method 2:
Follow the instructions in the Mustache documentation to add the variables manually.