Seeking Advice: Creating Empty Spaces in Repeating Group for Advertisement-like Layout

I’m working on a project where companies are interested in advertising within search queries on my platform, similar to Google’s paid search. To accommodate this, I’d like to add advertisement spaces within my repeating group layout.

I aim to insert an empty space in every fourth cell in the repeating group, repeating this pattern three times to create 12 cells in total for advertising placements.

  1. What’s the most efficient method to insert empty spaces in every fourth cell in a repeating group for advertising placements?
  2. Are there any Bubble plugins or workflows designed to streamline this process?

What’s the layout of your RG?

Is it a grid? or a vertical list?

Its a a vertical list set a height of 65 pixels I thought about adding an empty collapsed group and showing it every 4th cell until the repeating group count was > 12 . I just felt as though that wasn’t the best method.

in that case it’s simple… just add a group inside the RG cell for the ad, hidden by default, and only visible in every fourth cell.

1 Like

What is the conditional for everything 4th cell? Math isn’t my strong suite haha

Adam is probably whipping up an example for you, but in the meantime, this post should help.


But isnt it make the RG bulky, because when he adds ad in it, it will be available for all the Item, but only be visible on 4th one.

Or, it does not matter as bubble will not render it unless its visible. but still the code need to be downloaded for all item.


That was kind of my only worry. That’s why I decided to ask what people thought was the most efficient method.

Its also depend on how you are getting the Ads, as @mikeloc shared post, where the person is getting the ads as a API call and using the same method putting a element inside RG, and making it visible only it needed…

so, if i was that person , i made that api call a data type, and only call it inside the elemnt. thus it get only called when the element is visible. less work.

but @adamhholmes is a pro, he must have a resson what he do.

Here’s how to do it…

Insert Ads Into RG (


Thank you much appreciated @adamhholmes

1 Like

Is there a method that limits the volume of HTML being downloaded to the client (I.e. in the solution an advert exists for every item within the RG it’s just not shown). Maybe this would be important in some cases. Thoughts?

@Baloshi69 @rjwilkinson10

FYI elements which are not visible on pageload, and have ‘Collapse when hidden’ selected, are NOT included in the DOM (until they are made visible)… so no, this doesn’t make the code more bulky than it needs to be.

If the Advert is only shown in every 4th RG Cell, then it’s not included in the DOM for the other cells.

(that said… I have noticed an anomaly here under certain conditions inside RGs… where that’s not always the case, which I suspect is a bug)