Template and helpers
Use Handlebars power to generate newsletters.
Template
In this section you describe your newsletter body using Handlebars templating. With {{expression}}
you will have access to all the data you query in the GraphQL section as well as helpers you may have specified. Good to know, by default Handlebars will escape values returned by {{expression}}
Note: If you don't want Handlebars to escape a value (
&
in url for example), use the "triple-stash"{{{expression}}}
.
Example
<table><tr><td>Hello, welcome in your daily newsletter</td></tr></table><table><tr><td></td></tr><tr><td><imgclass="img"src=""width=""height=""alt="" /><p class="nl-article-nodes nl-article-nodes-last"></p><ul class="nl-article-nodes nl-article-nodes-last"></ul></td></tr></table>
Helpers
The last editing section allows you to define utility variables and functions for your Handlebars template. You can find more about helpers in Handlebars documentation.
Helpers run on the current LTS version of Node.js, it means all new features of JavaScript are usable.
Edit this page on GitHub