Best templating way to use condition

Hello,

I know there are a bunch of posts about conditional blocks but we are close to buy a licence and I didn’t find a clear answer about my question.
In our template, we need to perform a simple conditional block : if condition is true we display a text.
We don’t want to use IF Word field and we prefer the mustache syntax.
Regarding some posts, it seems that is not possible to use if statement with mustache syntax. Can someone confirm that it is really not possible (without using Word if field) ?
If it’s not possible the only alternative is the LINQ Reporting engine ?

Thanks for the answers.

@tsimon

You are right, unfortunately, there is no way to define IF condition using mustache syntax. For conditional blocks you you should use regular MS Word IF fields.

If you are restricted to simple text template syntax, then LINQ Reporting Engine is the only alternative. Please see our documentation to learn how to use conditional blocks in LINQ Reporting syntax:
https://docs.aspose.com/words/java/using-conditional-blocks/

Okay it’s noted. Thanks @alexey.noskov

1 Like