ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

support embedded partial? #94

Closed popmanhe closed 9 years ago

popmanhe commented 9 years ago

express-handlebars is great template for express. But I think it still misses one feature.

express-hbs has a feature: you can define a {{{block "blockname"}} in the layout file, and in the page, use {{#contentFor "pageScripts"}} ... {{/contentFor}} to insert an embedded partial to the page. This feature can let me insert a block of script at the spot specified place in the layout file.

I was wondering if express-handlebars has such feature? If not, can you guys implement it?

Thanks.

popmanhe commented 9 years ago

I copied some code from express-hbs module to support this feature. let me know if you'd like to add it.

ericf commented 9 years ago

This looks like a duplicate of #15

popmanhe commented 9 years ago

This feature is very useful. It should be like built-in helpers. Can you add these two helpers to your module? so users don't have to add these two helpers every time.

Thanks.

ericf commented 9 years ago

But this is just a simple set of helpers that are probably already available on npm by someone. Or if not you could publish them on npm :)

I think this expands beyond the scope of this package beyond what it should.