Handlebars.js 使用Mandrill创建自定义把手辅助对象?

Handlebars.js 使用Mandrill创建自定义把手辅助对象?,handlebars.js,mandrill,Handlebars.js,Mandrill,有没有办法用Mandrill定义自定义把手辅助对象?假设我有一个物体,货币单位是美分 "products": [ { "sku": "hdrPhotos", "price": 19000, "title": "Unlimited HDR Photography" }, { "sku": "panos", "price": 2500, "title": "Panoramas / Virtuals"

有没有办法用Mandrill定义自定义把手辅助对象?假设我有一个物体,货币单位是美分

  "products": [
    {
      "sku": "hdrPhotos",
      "price": 19000,
      "title": "Unlimited HDR Photography"
    },
    {
      "sku": "panos",
      "price": 2500,
      "title": "Panoramas / Virtuals"
    },
    {
      "sku": "fullVideo",
      "price": 43000,
      "title": "Full Video"
    },
    {
      "sku": "aerialDaytimePhotos",
      "price": 17500,
      "title": "Aerial Daytime Photography"
    },
  ]
我有一个模板:

            <!-- BEGIN PRODUCT LOOP // -->
            {{#each products}}
            <tr class="item">
              <td valign="top" class="textContent">
                <h4 class="itemName">{{title}}</h4>
                <span class="contentSecondary">${{toCurrency price}}</span>
                <br/>
                <span class="contentSecondary sku"><em>{{sku}}</em></span>
                <br/>
              </td>
            </tr>
            {{/each}}

{{#每个产品}
{{title}}
${{toCurrency price}}

{{sku}}
{{/每个}}
我想取
price
,单位为美分,然后编写一个自定义助手
toCurrency
,将其除以100


在标准车把中定制助手非常容易,但Mandrill是否可以使用它?

根据文档,这是不可能的:

“无论是否在Mandrill中使用模板,都要使用把手。我们将介绍把手的基本知识、专门为Mandrill实现的帮助程序,以及与标准把手的一些偏差和添加。”

参考:

甚至不是所有的帮手都来自handlebar