shannonmoeller / handlebars-layouts

Handlebars helpers which implement layout blocks similar to Jinja, Nunjucks (Swig), Pug (Jade), and Twig.

Home Page:http://npm.im/handlebars-layouts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there a way to use inline partials?

unstoppablecarl opened this issue · comments

handlebarsjs has an inline partials feature now. It would be nice to be able to do {{#embed 'my_inline_partial'}}{{/embed}}. Is there a different way to use them I'm missing?

Inline partials also do not appear to work from within a child context of a block or content or embed. Where the inline partial was defined in a parent context.

It's been a number of years since I've used Handlebars with any regularity, so I'm afraid I'm not up to speed on how newer versions of Handlebars maintain lists of partials. Given that Handlebars has this functionality built-in now, is handlebars-layouts still helpful?

I would say yes. Its got some slightly different abilities with extend vs embed. It would make more sense if it was something built ontop of the existing inline partials feature though

I'd be open to a PR if you wanted to dig into what it would take to update this library to be able to see those.