I’m wanting to create a site with a structure similar to as shown below, where I have a /geography directory with 3 different sections: countries, region, and cities. Essentially, I want to have all the pages of information grouped under their relevant category, but be able to access the information of child pages under a different parent.
/geography
/countries (listing)
/new-zealand (modular)
/regions (listing)
/waikato (modular)
/northland
/cities (listing)
/auckland (default)
/wellington (default)
For example, on the New Zealand country page, I want to create a module which will pull the child pages from /regions, matching any region page that has the header setting (or taxonomy) country: ‘new-zealand’ and then display certain information related to that page.
Similarly, I’d like to create a module for any /regions child page which would list the cities (plus city page summary, other info etc) that are flagged as part of that region. I figure it’ll be the same process for /regions as it would be for a country page…
I’ve had a look through the documentation, but I’ve not found anything that was clear about whether I could do this or not. I’ve experimented with page.find() and page.collection() but haven’t yet had any luck with getting these to work.
Any help regarding this would be greatly appreciated! Thanks!