Glad you figured this out. .Data
is a for list pages (i.e., nodes) that represents the data (pages, or the list of pages) available to them. The one caveat is that the homepage can use .Data.Pages
for all pages across the site. A single page doesn’t have .Data.Pages
because a single page, by default, doesn’t have any pages underneath it.
Hopefully this explanation of Hugo lists helps make things a bit clearer for future reference:
https://hugodocs.info/templates/lists/
Also keep in mind that from within a section page, you can use the even short {{range .Pages}}
…
HTH…