Free Support Forum - aspose.cloud

Merge Foreach Blocks in PHP


#1

Hello Aspose Team,

We are facing an issue getting Foreach Blocks to get merged in our templates. Do you have instructions of how we should enter these merge fields?

On the other hand, should we send a certain flag or field in our request in order to have Foreach Blocks merged successfully?

Thanks.


#2

@Softwareselskabet

Thanks for your inquiry. It seems you are populating data in foreach block of mustache template. Please check the PHP code in this documentation article. You may also test the API directly in your browser.

Furthermore, please note POST /words/{name}/executeTemplate works with Mustache Templates and POST /words/{name}/executeMailMerge works with MailMerge templates.

Hopefully, it will help you to accomplish the task. However, if there is any difference in your requirement and our understanding, then please share your sample input document, data and expected output document here. We will look into these and will guide you accordingly.