Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Ads within collection

Ads within collection

larsvilhelmsson
Excursionist
22 0 8

Hi, 

Theme: Dawn

A feature I've been looking for to be added is "non" or "clickable" ads within the collection page, see example. 

Is there a quick way to get this feature? Or a way with coding to solve my issue?

 

Cheers, 

 

Andy

 

collection_help.png

Reply 1 (1)

joshcorbett
Shopify Partner
28 1 9

This is something I'm planning on implementing into my company's theme. My planned approach is to create reusable metaobject definition called "advertisement", then an "advertisement placement". The placement would have an index and reference to an advertisement. A collection would have a metafield called "inline advertisements" or something, which would be an array or advertisement placements. This is all just to get the data where I want it, now for the theme portion. In the for loop of product cards, I'd see if the index matches with an advertisement placement metafield, and if so then render the referenced advertisement before rendering the product card in the loop.

I'm sure there are other approaches, but this one feels the most scalable to me. Of course I haven't implemented this yet, but this logic is what I'm leaning towards.

you can't just say perchance