Hi,
What you should do:
-Add a collection where people can add their foto’s to.
-Add the columns (creator,discription,image,likeNumber,likedBy(array))
-Add a page with a repeater on it.
-add the following elements(image,texfield(for the creator name, paragraph(for thr discription), a button that will be used as like button).
-Add a dataset to the page linked to the collection.
-link the repeater with the dataset and connect the element with the right fields.
- go to the code panel and on button click retrieve the amounts of likes, also retrieve the likedBy array.
- check the array if the user already liked it, if he is not in it
- add 1 to the likeNumber and add the user to the likedBy list.
Else remove 1 likeNumber and remove him from the likedBy list
The code for this is a bit complicated and i don’t have the time atm, but you can start trying by yourself ![]()
Kind regards,
Kristof.