The Scandlebars definition of a handlebars helper.
with Helper
with Helper
Usage:
{{with withContext}} {{!body}} {{/with}}
Any mustache will be with respect to withContext not the context in which the helper was called.
The Scandlebars definition of a handlebars helper.
The recommended fashion in which to define a helper is as follows. HelperOptions.lookup returns an Option which will evaluate to an empty string if the lookup does not yield a result.
It may be likely that you can predict the type of binding in practice. You could attempt to cast the context binding to the type you expect. This runs the risk of throwing a ClassCastException while rendering the template, which may be desirable. Use cautiously.
See com.gilt.handlebars.scala.helper.HelperOptions for all of the options available.