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 →

Two collections, for a total of four entries

Daniel Saksa May 28, 2019 by Daniel Saksa

I'm trying to get exactly 4 events (entries) to display at a time. Currently I have two collections. The first gets the in-progress/live events, the second gets completed events. I can get them each separately, but not quite how I'd like.

For example: If there are 2 live events, there should be two completed. If 1 live, 3 completed. If 0 live, 4 completed.

They're li's in a ul if that helps.

How would you achieve this? I've tried a number of things but so far no dice. Two collections nested works if there's at least one live result but if its empty the second one doesn't show because that's how it works.

Any feedback or ideas would be appreciated! Thanks!

Answered by Daniel Saksa!
>>>>>>> Answered <<<<<<<
3 Replies
2 Followers