I have client side dust template and a corresponding helper.
Helper :
function(chunk, context, bodies, params) {
};
Now I want to write some key value pair(from helper) which I can read in dust template.
e.g.If i write (k,v) in helper, in dust template
{k}
should output 'v'
Thanks,
Shantanu
A helper in Dust receives the current
chunk
andcontext
. You can push new values onto the context stack, and then callchunk.render()
.Here, I am rendering the default body (
bodies.block
), using the existing context as well as my extraobj
, which is pushed onto the context stack.