Another weird issue with #Eleventy #Nunjucks templates…
I have these two lines:
{% set photos = page.data.photos %}
{{ page.data.photos | length }} / {{ photos | length }}
The result is:
0 / 24
What the… 🤨
EDIT: the issue was me all along… 😞
Nicolas Hoizey (@[email protected])
@[email protected] ooooooh, I feel so dumb! In the layout for the page, `photos` is directly available, it's not in `page.data.photos`! 🤪 My assignment was not required, and actually did nothing. I don't know why I thought data coming from eleventyComputed in a directory data file was always in page.data.… 🤷♂️