Handlebars helper for template composition
I have a Handlebar helper to invoke a template within a template, the usage is this : applyTemplate subTemplateId arg1=123 arg2="abc" ... It is also possible to pass html content {{# applyTemplate "tli" a=1 b="y"}} ... any content here will get passed to the sub template with {{content}} {{/ applyTemplate }} This jsFiddle illustrates how it works : http://jsfiddle.net/maxl/ywUjj/ My problem : I want the variables in the calling scope to be accessible in the sub templemplate, in the jsFiddle, notice how {{topLevelVar}} is not available. Thanks From this example i would say you can use fn to