New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Collection loop over to show only parent and not its children

Rohan kamble September 2, 2020 by Rohan kamble

I was just looking out a way to loop over collections but don't want to list any children, I need only entries which are at 1st level. I have tried a few things out of max_depth was one.

My collection structure looks something like this

Screenshot-2020-09-02-at-10-41-53-PM

And I want to print only Test 1 & Test 2

Answered by Rohan kamble!
>>>>>>> Answered <<<<<<<
2 Replies
2 Followers