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.
What’s the most efficient method to insert empty spaces in every fourth cell in a repeating group for advertising placements?
Are there any Bubble plugins or workflows designed to streamline this process?
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.
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.
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?
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)