I'm moving e-mail templates from Mandrill to Postmark which requires converting Handlebars to Mustachio. In Handlebars I had something like this:
{{#if some_variable}}
<p>This text uses variable: {{some_variable}}
{{/if}}
According to Mustache documentation it should look like this after converting:
{{#some_variable}}
<p>This text uses variable: {{some_variable}}
{{/some_variable}}
The problem is that Postmark's Mustachio uses scoping (https://github.com/wildbit/mustachio/wiki#scoping), so in that case it expects following JSON model:
{
"some_variable": {
"some_variable": "some_variable_value"
}
}
instead of
{
"some_variable": "some_variable_value"
}
Does anyone know how to turn off Mustachio's scoping, so it uses expected exemplary JSON model? The only workaround (dirty one) I see so far is to pass template model in this nested object form, but I already found out that it wont work in all cases. Thanks in advance, any help appreciated.