Default rating system in Sharepoint 2013 allows to like elements in list view like this:

enter image description here

and I have no problem to get count of "likes" with FieldRef Name='LikesCount' but I wonder if is it possible to add "Like" button to each element using SPServices? and then display elements as divs like this:

enter image description here

  • You can do CSR using JSLinks. Basically you handle how the field should get rendered. Apr 7, 2015 at 13:01
  • Correct me if I am wrong but you are talking about modifying current list view and rearrange elements to display as I want? Apr 7, 2015 at 13:08
  • Yes. You can do what goes where and how it should be displayed etc. In your case I believe you just need to handle how the like field is rendered Apr 7, 2015 at 13:10
  • I just need "like" button on square containing image or title and that is it Apr 7, 2015 at 13:14

1 Answer 1


there's a JS function called set like that can help you, you might want to try to mix CSOm and JSOM to create the functionality you want

you only need 4 parameters the clientcontext (which is loaded for the site that contains the list)
the ListId
the ItemID
the Value =True to like/False to unlike


then you can execute your queryasync and switch the label text to like/unlike depending the like status.

you'll still need to query somehow the item's likecount field to check if the users has liked the item before adding the like/unlike button

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.