JsRender Demos

Template context: Passing in additional helpers to a render() call

Passing in contextual variables or helper functions, using the helpersOrContext parameter of ...render( data, helpersOrContext );
$( selector ).render( data, {
    reverseSort: reverse,
    format: myFormatFunction,
    buttonCaption: function(val) {
        ...
    }
})
Use ~name to access context variables or helpers by name - whether passed in with options,
registered globally as helpers, or registered as helpers for a specific template.
<th><button>{{>~buttonCaption('sort')}}</button></th>
...
<td>{{>~format(title)}}</td>
...
<td>{{sort languages reverse=~reverseSort}}...{{/sort}}</td>