Mustache syntax word aspose if conditions not working

mustache syntax word aspose if conditions not working

using below code inside word template

{IF “{{ Title}}” = “Fabric Binder” “true text” “false text”}

its inside the foreach

{{#foreach DataList}}

@gauravgarg04 It looks like in your template you use a simple text for IF condition. But it must be a MS Word IF field.
Press Alt+F9 to see field codes. Mustache syntax can be applied only to merge field themselves but not to the condition fields.
You can insert IF field either from the MS Word dialog:

or by pressing Ctrl+F9 in MS Word and typing field code.

@alexey.noskov is there any way to have code syntax in tamplate

@alexey.noskov
Can you please check if there is way
Because we have complex conditions
Also on based on If conditions we want to hide or show the text blocks

@gauravgarg04 If you need all your syntax to be a simple text in your template, you can consider using LINQ Reporting Engine instead of Mail Merge:
https://docs.aspose.com/words/net/using-conditional-blocks/