koca / grav-theme-masonry

Masonry, grid-based blog theme for Grav
MIT License
45 stars 8 forks source link

Default.html.twig doesn't list child pages properly. #20

Closed nikspyratos closed 7 years ago

nikspyratos commented 7 years ago

Page.collection() on line 2 is seemingly empty for some reason. Changing it to page.children() fixes the issue, but I'm wondering what is causing this? Between today and the last time I worked on my site using Masonry 10 days ago, nothing was changed in the code and then it broke when I tried to add a new gallery posts container page.

koca commented 7 years ago

Which skeleton do you use?

nikspyratos commented 7 years ago

Apologies for late reply. Was default skeleton. As I said, just added posts to the page again and they wouldn't appear as tiles.

As per my SO post ( https://stackoverflow.com/questions/45762719/page-collection-is-empty-despite-having-child-pages ), user HungTran showed that it was probably a header issue.

koca commented 7 years ago

No worries. I'm not sure if I understand the issue correctly but did you solve the issue?

nikspyratos commented 7 years ago

Yes, I fixed the issue. Page.collection() on line 2 was empty, so the theme displaying its grid of posts didn't work. What I posted was more to understand the cause, if you had any ideas.

I suppose this can be closed.

koca commented 7 years ago

I tried with latest version of Grav and can confirm that everything works as expected. Please use a skeleton which is compatible with the theme(e.g. Mediator) or make sure to check Pages Hierarchy.