Help Adding Something In between Post Lists

Hey everyone!
I am working on a social app. I was wondering if it were possible to put another list in between a main list.

Basically I want to show user posts but every like 4 or 5 posts show some sort of ad. They wont be admob ads or anything. I will have it so users can create ads in the app much like a normal post.

So every 4 or 5 posts a users ad post would show up.
Is something like this possible?

Thanks

1 Like

Hi @cmoon721 ,

Yes, this is possible.

But, you need to count posts sequentially, so it will depends on how the lists is sorted, if the sorting is changed then the ads will not in their intended place anymore.

By adding boolean field into the list collection and show ads when this is true.

So when adding post, use App Setting collection, which is a 1-record collection that can be disguised as button to create new posts, and count the non ads posts which is 4 or 5, then after this number, create new posts with that boolean as true.

So basically, you will create posts like this

Posts# Boolean Created Date
6 false newest
5 true
4 false
3 false
2 false
1 false oldest

The suitable sorting in this case is created date newest to oldest, but if you want to change to another sorting, the counting method need to change as well.

1 Like

Thank you for replying. Im afraid I don’t quite understand how to put this into practice. How do I go about counting the posts? Is it possible for you to make a quick video showing it? I am a visual learner so it is easier for me to understand things if I see it being done. Sorry for an inconveniences.

1 Like

I put modification here,

Screen Shot 2021-11-17 at 5.54.48 AM

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.