Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Implementing custom "likes" in SharePoint 2013

$
0
0

We're developing a new intranet using SharePoint 2013 and I have a question about the "likes" functionality. I've created a custom list and I've turned on the rating (Rating settings) for the items in this list using the "Likes" alternative.

So far, so good. I can like and unlike any item in the detailed list view (AllItems.aspx).

But my users are not going to see that list. Items will only be available to the users in a usercontrol that I've added to my pagelayout. The usercontrol will show number of likes and contain a Like button/link to let the current user like the item too.

The number of likes for a particular item is stored in the likesCount field, which is added to the list when the rating is turned on. I can read the likesCount field like any other field, but how can I update this information? I obviously need to store information about the logged in user as well.

Since the likes button is standard i SharePoint 2013, there must be a way to hook up to this particular functionality programmatically.

Please help or point me in the right direction. Any code examples in c# would be appreciated.



Viewing all articles
Browse latest Browse all 25064


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>