【发布时间】:2016-08-16 03:06:56
【问题描述】:
sightly 模板/调用模式是否包含默认值?
给定一个模板:
模板.html
<template data-sly-template.tmpl=${ @ foo='bar', baz='buzz' }>
<p>the value of foo is ${foo}>
</template>
假设它被调用:
<sly data-sly-use.myTemplate="template.html"
data-sly-call="${myTemplate.tmpl}"/>
我想要一个输出:
<p>the value of foo is bar</p>
这可能吗?我想在助手中使用它,说我有一个默认情况下通常为“true”的标志,但我希望能够在某些情况下设置为 false。
谢谢
【问题讨论】: