$localizedResource not working in each loop?
-
I don't know if I'm doing something wrong but I can't get localized data to work within an each loop.
{{$localizedResource.averageAbbr}}
{{#each dimensions.primaryZone}}
<td>
<div style="background-color: {{primaryZone.rgb}}">
<h2>{{primaryZone.name}} ({{harvest.yield}} {{@root.units.yieldPerAreaLabel}})</h2>
<div>{{$localizedResource.averageAbbr}}The first one at the top prints that localized version just fine. The second one within the loop does not. I have even put it right after the each and it doesn't work. This is for html or any recipe that I have tried. (chromium pdf, phantompdf)
What am I doing wrong?
Thanks!
-
You need to get to the outer scope inside the loop. See this here for example. I think it should work to use
{{../$localizedResource.averageAbbr}}
-
Okay, I figured it was something stupid. Thanks!