How to put a conditional in a scope on mustachio for postmark template

95 Views Asked by At

I can't find a solution for this problem I have a template like this (all my trades are managed with balises like this in my template):

{{french}}Bonjour{{/french}}{{english}}Hello{{/english}}

I want to add a conditional balise in each trad balise like this:

{{french}}Bonjour {{^isToday}}demain{{/isToday}}{{/french}}{{english}}Hello{{^isToday}}tomorrow{{/isToday}}{{/english}}

But the data template model I send to the api is something like this:

{
  french: true,
  isToday: true,
}

Mustachio wants my "isToday" to be in the french object I'm a bit lost I also tried to up one level in my scope but it doesn't work:

{{french}}Bonjour {{^../isToday}}demain{{/isToday}}{{/french}}

Any idea please ?

Regards,

0

There are 0 best solutions below