1

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

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

I wanna add a conditionnal 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,

  • 1
    Mustachio is not the same as Handlebars. – 76484 Jun 15 '23 at 13:09
  • It is also not the same as Mustache. Have you tried `{{^../isToday}}demain{{/../isToday}}`? In Mustache, the content of the closing tag should match the opening tag exactly, so maybe they preserved that rule in Mustachio. – Julian Jun 15 '23 at 19:43

0 Answers0