[Feature request] Registering partials #38

kapowaz opened this Issue Jan 30, 2012 · 6 comments


None yet

7 participants

kapowaz commented Jan 30, 2012

The current implementation of template.render() assumes that you know exactly what partials (if any) a given template references, which makes calling this method elsewhere somewhat problematic — you need to supply the partial as an argument to the call, which makes dynamically assembling calls to render a bit tricky.

Perhaps I'm missing some crucial detail of how partials are implemented, but if not I'd like to request a feature: that partials can be registered elsewhere (as Handlebars does) and then whenever a template is called it uses a previously registered partial of the appropriate name as it needs to.

Baggz commented Jan 30, 2012


tkellen commented Mar 12, 2012


abh commented Mar 14, 2012

For what it's worth we "solved" it by just passing the templates object as the second parameter. Seems to mosty work okay so far.

sontek commented Sep 5, 2012

Yeah, I just pass all my templates in a dictionary to the render call but this could be a good feature.

abhiesa commented Oct 12, 2014


atk commented Jul 18, 2015

Currently I use an additional step between compilation and rendering to gather all of the required partials; however I find this most unsatisfying there is no builtin solution to that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment