Open blueowl0708 opened 7 years ago
This may be related. The context changes within these helpers. Quite unexpected.: https://github.com/helpers/handlebars-helpers/issues/309#issuecomment-392103700
~~Did anyone ever find a solution for this?
I also cannot seem to use {{is @key data.user.status}} some text {{/is}}
for example. There's no error thrown, but the text doesn't display correctly either.~~
Scratch this, I forgot to reference the global variable with ../data.user.status
, then the comparison worked just fine.
version
Gulp with Assemble 0.21.0 + Handlebars-Helpers 0.7.7 (tested in latest versions of both)
description
FYI I've moved this over from the assemble repo at the request of @jonschlinkert.
I'm migrating a site from grunt + assemble to gulp + assemble and I'm having trouble with the following code which works fine on the old build.
In our hbs file there's a YAML object:
We pass this into a partial for processing
The partial looks like this:
And this is the output - the article title is always 'Article title 3'
What I'd expect (and what I get in the grunt assemble build) is:
{{#isnt @key "open"}} seems to be causing the problem. If I remove this from the second loop, all titles, urls and the description are ok, but then I get 'open' as list item which I don't want.
This may be a case of having to restructure the data in the hbs file, but there's a few so I'd like to avoid that if possible.