我将handlebars.js与keystone.js一起使用。因此,为了将值嵌入我的<script type="text/x-handlebars-template">
模板中,我在句柄表达式之前添加\
。像这样:
<script type="text/x-handlebars-template">
<img src="\{{mainImage}}">
</script>
问题在于嵌入辅助值。我尝试使用默认的cloudinaryUrl助手,但是它不起作用:
<script type="text/x-handlebars-template">
<img src="\{{{cloudinaryUrl mainImage quality='auto' format='jpg'}}}"
</script>
我在控制台中看到Missing helper: "cloudinaryUrl"
消息。
我该如何解决?