I’m building a photographers portfolio and have set up individual projects as children on a “Projects”-page. The structure looks like:
– Home
– Projects
---- Project A
---- Project B
---- Project C
– About
You get the idea… Photos for each project will be dumped into their respective folders and can have certain metadata applied to them (using file fields), if they should be featured on the front page or not.
Now, I’m sure it’s super easy, but I just can’t seem to figure it out: How would I search all children of “Projects” for featured images and echo them on the front page?
Cool, that’s a step in the right direction! I just gave it a quick try and it seemed to output only the featured images of the last project. So I guess I need to populate a collection with every iteration the loop, right? Ideally, all featured images from all projects should be stored in a variable.
Since the second foreach loop is within the first, it should iterate through the children first, return a collection of images for the first child, output these images and then go on and do the same for the next child … Can’t currently see the error at the mo …
Please correct me if I am wrong. In my test ‘true’ and 1 are not the same, when the “==” operator is used with the filterBy method.
For a single checkbox field I have to use 1.
And the toggle field only filters correctly with true.