Hi guys, I'm looking to implement properly a favorite/like system where people can save content and people can see the amount of favorites each content has in umbraco.
Normally this information would be saved in a new table with a composite key of { ContentID, MemberID } and maybe an extra BOOL field that could be used for dislike too.
Is this possible to do in Umbraco? Or will I have to settle for server generated primary key and non-refferencing ContentID, MemberID?
Would it be possible to attatch
and access this info from IPublishedContent items? Need: A) total
likes B) If current user has liked or not
Should/could this info be
indexed using ExamineManager?
Would this be better to do by adding a custom property to a node then saving members that liked the content in a comma delimited fashion? IE: UsersWhoLiked = "1234,1235,1236" . If more than 50-100 people like each content this can get ugly pretty fast though..
I'm not sure what the best approach would be exactly, but I definitely wouldn't do the last idea. The problem with the last idea is that each time a document is updated you would need to re-publish that page to make changes live. Each time this happens a new version of the document would be created and the cache would be updated. Just imagine how often this would be trying to happen if you had 50-100 people like each document and there were 100's of documents.
I would probably look at keeping this in a separate database table which can be updated and read independently without having to run a publish event.
Implementing a favorite/like system
Hi guys, I'm looking to implement properly a favorite/like system where people can save content and people can see the amount of favorites each content has in umbraco.
Normally this information would be saved in a new table with a composite key of { ContentID, MemberID } and maybe an extra BOOL field that could be used for dislike too.
Thanks in advance for any help and guidance.
Hi Mike,
I'm not sure what the best approach would be exactly, but I definitely wouldn't do the last idea. The problem with the last idea is that each time a document is updated you would need to re-publish that page to make changes live. Each time this happens a new version of the document would be created and the cache would be updated. Just imagine how often this would be trying to happen if you had 50-100 people like each document and there were 100's of documents.
I would probably look at keeping this in a separate database table which can be updated and read independently without having to run a publish event.
Hi Mike,
Relationele are ideally for this. Easy, fast and made for this purpose.
https://our.umbraco.org/documentation/reference/management/services/relationservice
http://umbraco.com/follow-us/blog-archive/2012/12/7/getting-to-know-umbraco-relations/
Silly me! Thank you very much for the links...
is working on a reply...