Open dtothefp opened 8 years ago
As discussed here https://github.com/assemble/assemble-core/issues/13 and here https://github.com/jonschlinkert/templates/issues/17
view on the file context is difficult in Nunjucks. A typical nunjucks tag can be constructed like so https://mozilla.github.io/nunjucks/api.html#custom-tags and you can see an example in my assemble sample repo https://github.com/dtothefp/assemble-view-issue/blob/master/tags/debug.js
view
file
I was previously accessing view off of context.ctx in the Nunjucks tag, and you suggested I can access it in a helper using this.view but I don't know how this transfers into Nunjucks land
context.ctx
this.view
@dtothefp Thanks for the issue! If you're reporting a bug, please be sure to include:
assemble
As discussed here https://github.com/assemble/assemble-core/issues/13 and here https://github.com/jonschlinkert/templates/issues/17
view
on thefile
context is difficult in Nunjucks. A typical nunjucks tag can be constructed like so https://mozilla.github.io/nunjucks/api.html#custom-tags and you can see an example in my assemble sample repo https://github.com/dtothefp/assemble-view-issue/blob/master/tags/debug.jsI was previously accessing
view
off ofcontext.ctx
in the Nunjucks tag, and you suggested I can access it in a helper usingthis.view
but I don't know how this transfers into Nunjucks land