Twig testing is possible with TwigFiddle, where the result of any Twig code can be checked.
Note: There are some unique Emarsys tags, parameters and filters, for which you cannot use this testing method easily.
Here are the exceptions for which you can’t use TwigFiddle:
foreach
: If you wish to test code with theforeach
tag, we suggest that you replace it with a simplefor
tag, so that you can check your code.
For example, this is how you can test the for
tag instead of foreach
in TwigFiddle.
{% for value in [1, 2, 3, 4] %}
{{ value }}
{% endfor %}
limit
parameter: It’s not possible to test it in TwigFiddle.rds
-related codes: It’s not possible to test them in TwigFiddle- It is not possible to test the following unique filters in TwigFiddle:
localized_date
localized_time
localized_datetime
required
For editing your script, Atom and Notepad++ can be useful with a Twig-specific add-on.