Handlebars.Net icon indicating copy to clipboard operation
Handlebars.Net copied to clipboard

Setting a variable in the context

Open gcubar opened this issue 1 week ago • 0 comments

How to define a helper to set, in the context, a variable with its respective value, and then handle it, either in an expression, or to print it.

{{set variableName "variableValue"}} ... {{#if variableName}} {{variableName}} {{/if}}

gcubar avatar Jun 20 '24 21:06 gcubar