Displaying entrys from sub sub folders

Hey all,

I need to setup a site structure like shown in the picture below:

Link to image that I’m not allowed to embed :frowning:

all projects are supposed to be displayed on the home page although they are in category folders.
I use this code to display projects:

<?php foreach(page('work')->children()->flip()->visible()->limit(9) as $project): ?>

but this only works if the projects are located in the work folder. how can I display them out of the category subfolders? Is that even possible although the β€œwork” page is set to be invisible?

On the right side of the image there is another section of the website, that has a different logic to it but must work alongside. I’m quite confused how to set this up.

can anyone point me in the right direction?

You can use grandchildren():

<?php foreach(page('work')->grandChildren()->flip()->visible()->limit(9) as $project): ?>

What do you want to flip here? The flip() part should probably come after visible() is this case?

wow, that works like a charm!

Thank you a lot!