Hi! I’m a bit stuck with this so I’m hoping someone might be able to help me out.
I’m making a table of contents type of thing for a series of projects (subpages). I would like the numbers next to the project title to count all the blocks in one of the layout fields (called layout in this case) of that project (subpage) and then show the number span for that subpage (like with a page count in a book). And then the next project should start from the next number and do the same for that one, and so on.
I’m guessing I have to do some kind of loop and I see that it’s possible to get the count of blocks and layouts, but I just can’t quite get how to put it all together. When I tried the layouts()->count() I just got the number 2 which I don’t see how could be correct so I’m not sure what’s happening. Here’s an image of how I would ideally like it to work: