【发布时间】:2021-10-10 20:18:36
【问题描述】:
我尝试设置一个包含多个把手的 Sendgrid 动态模板,包括一个 Iterator with each 整个邮件模板html可以找到her
测试数据如下:
{
"total":"1000",
"items":[
{
"text":"Ebook 1",
"qty":"1",
"price":"3"
},
{
"text":"Ebook 2",
"qty":"2",
"price":"3"
},
{
"text":"ebook 3",
"qty":"4",
"price":"3"
}
],
"name":"John Doe",
"address01":"Stargate 292",
"city":"NY",
"state":"NY",
"zip":"4567",
"orderId":"456",
"expiry":"Nov 9 2021",
"customerRef":"123"
}
由于某种原因,我在保存时不断收到此错误:
您的模板已成功保存,但我们检测到您的车把代码存在需要注意的问题。
我找不到任何其他错误消息可以准确地告诉我为什么和在代码中发生此错误的位置。
我正在使用 {{#each}} 迭代,不是 100% 确定这是否正确设置
{{#each items}}
<table>
<tr>
<td>{{this.text}}</td>
</tr>
<tr>
<td>{{this.qty}}</td>
</tr>
<tr>
<td>{{this.price}}</td>
</tr>
</table>
{{/each}}
其他车把只是基本的,如{{ name }}、{{ city }} 等。
有没有人遇到过这种错误并知道如何解决?
【问题讨论】:
标签: sendgrid sendgrid-templates