{{#unless(expression)}}
{{#unless(EXPRESSION)}}FN{{else}}INVERSE{{/unless}}
Renders FN
if EXPRESSION
is falsey or INVERSE
if EXPRESSION
is truthy. Both FN
and INVERSE
will be rendered with the
current scope.
{{#unless(person.isAwake())}} Shhhhh! {{/unless}}
Parameters
- EXPRESSION
{KeyLookup Expression|Call Expression}
:A lookup expression that will provide a truthy or falsey value.
- FN
{sectionRenderer(context, helpers)}
:A subsection that can be optionally rendered.
- INVERSE
{sectionRenderer(context, helpers)}
:An optional subsection that will be rendered if
EXPRESSION
is truthy and {{else}} is used.
Use
The unless
helper evaluates the inverse of the value
of the key and renders the block between the helper and the slash.
{{#unless(expr)}}
// unless
{{/unless}}