You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{#> more-script}}
{{!-- per page script --}}
{{/more-scripts}}
I notice many packages have a block, contentFor, or extends block on npm but lack the layout feature crying
No idea how I can do this. Some quick syntax on the top of my head I read earlier.
Page 1:
<div>
{{#block 'myname"}}{{/block}}
</div>
Other page:
{{contentFor "myname"}}
Oh my gosh!
{{/contentFor}}
By extend:
Page 1:
<div>
{{#block 'myname"}}{{/block}}
</div>
Other page:
{{#extend "page1"}}
{{#block "myname"}}
Oh my gosh!
{{/block}}
The text was updated successfully, but these errors were encountered:
Your question seems more about how Handlebars itself really works. This package doesn't really do much except re-introduce the layouts feature. As of 1.0.0 (~a few minutes ago), however, you can pass your own instance of a Handlebars environment in and register your own block helpers/partials/whichever with that ahead of time, if that suits your needs.
I'd be interested in learning more about the items you've mentioned, though. Are those external functionality provided by other packages, or some sort of helper functions? I'm not familiar enough with the concepts in your example to know at a glance. Can you list any packages on npm that include this functionality?
I never had to implement this, but is it possible to do something like this:
layout.hbs:
index.hbs:
foot.hbs
I notice many packages have a block, contentFor, or extends block on npm but lack the layout feature crying
No idea how I can do this. Some quick syntax on the top of my head I read earlier.
Page 1:
Other page:
By extend:
Page 1:
Other page:
The text was updated successfully, but these errors were encountered: