I’m using the mail merge mustache templating functionality to populate a document (https://docs.aspose.com/words/net/mail-merge-template-from-mustache-syntax/). I’ve been using the #foreach syntax for looping regions, I wondered if there was an equivalent for if blocks?
The link above shows an inline if syntax, like:
{ IF “{{ GENDER }}” = “MALE” “true text” “false text” }
but I’m really looking for a region based syntax as I may need to include more complicated content such as lists, tables, images etc. Ideally something like the following where I can provide a truthy value and have it shown/hidden accordingly:
{{#if is_male}} Some more complicated content in here {{/if is_male}}