Closed bacloud23 closed 1 year ago
by the way everything suggested here does not work https://github.com/eta-dev/eta/issues/254
(passing destructed {it}
, or an empty object {}
)
@yanna92yar you should be able to do include('head.eta', it)
. Does that not work?
No it doesnt, it was that way also before with includeFile, so I didn't change that. Every partial has the parent calling with it
@yanna92yar could you give me a minimal example?
This is an example: https://github.com/yanna92yar/test-eta
If you check: https://github.com/yanna92yar/test-eta/blob/main/templates/partial.eta
and try to use variable without it
it crashes.
Thanks a lot ^^
You need to pass the config directly into the Eta()
constructor. In your repo,
engine: {
eta: new Eta.Eta({ useWith: true })
},
Thanks a lot 🙏
Hi, I was using
includeFile
fine, and along with global configurationuseWith: true
, I have been using:Now
includeFile
bugs so I changed it to include, along withuseWith: true
, but variables are not being passed.Adding
it.
to each variable will be painful :/ so better to find a better wayThanks a lot ^^