‘Like’ Publishing Pages in SharePoint 2013
Inconvenient SharePoint, JavaScript, SharePoint 2013, Social, Tools
‘Liking’ content is one of the new capabilities of SharePoint 2013. And while it works perfectly for Documents and List Items, it doesn’t seem very useful for Publishing Pages. So how would you Like a Publishing Page?
‘I Like This’
In the past many intranets were mostly about broadcasting content to employees. On-line interaction and discussions weren’t that important and getting the information to the people was good enough.
With the advent of social things are changing however. Nowadays social features not only facilitate discussions and collaboration but are also a way for organizations to get feedback from their employees.
Social feedback in SharePoint
Although SharePoint 2007 contained some functionality that you could consider as basic social feedback, it was the 2010 release that introduced concepts as comments and rating. In SharePoint 2013 those features are back and next to the ability to comment and rate content we can also like it.
Comparing to rating, where you have to think about whether the content is good or very good, liking is so much easier: you either like the content or not, period.
Liking content not only serves as feedback to its authors. In many organizations it’s also an important way for improving the discoverability of the content.
Liking content in SharePoint 2013
Because there are valid scenarios for using both ratings and likes, SharePoint 2013 offers us both capabilities. On a per-List basis you can choose which one you want to use. After enabling ‘Liking’ on your List, a new column called ‘Number of likes’ will be added to the List View.

Using this column you can see how many people have already liked the particular piece of content but you can also (un)like the content yourself.
This standard interface works great with Documents and List Items, but what if you wanted to allow your users to like Publishing Pages as well?
Liking Publishing Pages: not so great out of the box
Usually, to allow users to interact with some content on a Publishing Page, you would drop that particular piece of content on the Page Layout. If you tried to do exactly that with the ‘Number of likes’ column, what you would get, wouldn’t be exactly what you would expect:
The only thing visible on the page is the number of likes. The ability to like the page however is nowhere to be seen. So much for social feedback. There is however a better experience to think of, that offers you exactly what you want.
Liking Publishing Pages with Mavention Like This Page
Mavention Like This Page is a no-code Sandboxed Solution for SharePoint 2013 that allows your users to Like Publishing Pages.
After installation the Mavention Like This Page Site Collection Feature is automatically activated. The only thing left for you to do is to put the following code snippet on your page where you want the Like control to appear:
<div id="mvLikeThisPage"></div>
The next time you load your page, instead of seeing the number of likes, you will see the standard SharePoint 2013 Like control that will allow your users both to see how many other people have already liked the particular page, as well as Like that page themselves.
Summary
SharePoint 2013 offers the ability to like content. By default this capability is limited to List Views which makes it useful for use with Documents and List Items, but inconvenient to use with Publishing Pages. Using the Mavention Like This Page Solution it’s possible to add the standard SharePoint 2013 ‘Like’ control directly on the page.
Download: Mavention Like This Page (2KB, WSP)




February 23rd, 2013 at 6:39 pm
I remember using SP2010 rating control in a custom sharepoint page layout by reffering to the rating user control ( or the rating class control) from within page layout.
OOTB page layout doesnt allow you have to have rating , but by putting that OOTB rating control on custom page layouts, we can get the desired results for SP2013 also, i guess. havent tried.
but thought let me put across and check if that has been tried.
February 24th, 2013 at 12:12 am
It seems like the Rating control only supports ratings but doesn't contain any logic for likes. I also haven't found any other control that would support likes although would definitely be interested in your findings.
March 28th, 2013 at 2:04 pm
Thanks Waldek.
I searched the interwebs for anything on a Likes control and you provided the solution. Where is Microsoft on this?
Anyway, thanks for sharing.
Joe
April 11th, 2013 at 3:28 pm
Will liking content also work with cross site publishing?
Or are there other solutions how liking content could be enabled in such a scenario?
April 11th, 2013 at 4:51 pm
I'm not sure if you would be able to run such call in the context of your own Site Collection or if you would need to call it in the context of the Site Collection where the content is stored physically and which very likely wouldn't work due to the cross-domain calls restrictions. I guess you would just need to try.
May 8th, 2013 at 1:38 pm
Hi Waldek,could you share the source code? :)
May 8th, 2013 at 5:55 pm
Unfortunately at this moment the source code is not publicly available.
May 12th, 2013 at 12:11 pm
Hi BB, It is a shame that Waldek doesn't want to release his source code, and unfortunately it's obfuscated too in the WSP :). I looked into how the functionality is created on the page library list view, and extracted the code need to put it on a publishing page, your can read about it on my blog: http://wp.sjkp.dk/sharepoint-2013-add-like-functionality-to-publishing-page-with-javascript/ – it would be nice to compare it to waldeks solution.