Two databases, one list

Hi fine people,

I’ve been scratching my head for a little while about this, I expect someone else has the lateral thinking capabilities to nail it!

I have a custom list of ‘news items’, into which I want to insert small banner ads at random. The banner ads will be custom, ie, not admob or anything like that, just images which require links. The selection of the banner ads will also be at random, so there would be a catalogue of say 20 ads, which would be inserted at random beneath random news items. I guess this means two databases and some sort of random number generator, perhaps two, to cycle the images and then to elect and display them.

Hopefully, that makes sense! I’ve uploaded a screenshot to show what I mean, apologies for the OTP message obscuring it a little!


Another image which is perhaps clearer

Hi @JLCSerious ,

I would suggest to have visibility group in that list, and another field to link to another collection.

So, whenever the post is ads=true, visibility group of post will be hidden and visibility group of ads will be shown and the content will get from relationship field to other collection.

So, in summary, your post collection will need additional boolean field, relationship field to other collection (for content in ads group).

Thank you Yongki, I believe I see what youre saying:

  • one database with both ‘ads’ and ‘news items’ in
  • true/ false value for ‘ad?’
  • if ‘ad?’ is true, then news item component in list not visible and ad image is visible
  • if ‘ad?’ is false then news item component in list is visible and ad image is invisible

This doesn’t solve the randomising element of the ads however, which is integral to my advertising scheme as a blanket price was going to apply to all customers, their image would just go into a database and they’d all have an equal chance of popping up.

Alternatively I could just have a single banner a the bottom of the screen which randomly loads a different image everytime, perhaps theres a way to do this with a carousel?

1 Like

This may be the answer for a single banner. Not ideal as would require reprogramming the randomiser everytime, plus you’d need a true / false parameter for if the client hadnt paid that month but you didnt want to delete the record… Not that finessed! Any more ideas would be welcome

1 Like

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