ericf / express-handlebars

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

contentFor / block helpers can't be used multiple times? #122

Closed bradvogel closed 9 years ago

bradvogel commented 9 years ago

I have the following block helper:

{{#contentFor "pageTitle"}}my page{{/contentFor}}

and then I use the block helper twice in the parent layout:

<title>{{block 'pageTitle'}}</title>
<meta name="og:title" content="{{block 'pageTitle'}}">

However, the resulting HTML is:

<title>my page</title>
<meta name="og:title" content="">

It looks like a block can only be used once. This seems like a bug, right?

ericf commented 9 years ago

I'm not sure, you're using custom helpers here. I'd need to see the implementations of these helpers in order to help. Can you share those?

bradvogel commented 9 years ago

My apologies - I filed this against the wrong repo. Real issue here: https://github.com/barc/express-hbs/issues/78