Streaming live at 10am (PST)

Using Voting System/ Like Button in Webflow CMS

Hello,

I have tried to add a like button to my webflow CMS content. However, when I press like it likes every item in the collection. Is there a way that I can make sure that the like applies to each item independently.

My Read Only:
https://preview.webflow.com/preview/the-red-tape-panel?utm_medium=preview_link&utm_source=dashboard&utm_content=the-red-tape-panel&preview=f14c21fcade446883ae772f4ee36f19e&mode=preview

Since the custom code is placed inside the collection it replicates the exact same function for each item. You need to use a variable (e.g. you could use a CMS field) that is unique for each item (data-identifier) so that the like function works the way you want.

Hi Gail thank you very much this makes sense. The only thing is I am not quite sure how I would go about this? Would you be able to offer up further advice please?

Yes, you need a unique field for each item in your collection to set for the data-identifier in your code.

Thanks Gail I did it!!