Skip to content

Instantly share code, notes, and snippets.

@mspanish
Created October 28, 2013 06:06
Show Gist options
  • Save mspanish/7192053 to your computer and use it in GitHub Desktop.
Save mspanish/7192053 to your computer and use it in GitHub Desktop.
Dust.js partial helper, sets new context
"partial": function( chunk, context, bodies, params ){
var partial_context = {};
/* optional : context fo server processed partial related data*/
var p_context = context.get("partial");
if(p_context || params) {
// add to the partial context
}
return bodies.block( chunk, dust.makeBase(partial_context));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment