I am trying to reorder casual sharepoint list view which looks like this:

Casual sharepoint list with like function

To look like this:

Desired list view

I am using JSLink and I have no problem with normal text fields like "Title" or "Description" but I dont know how to add "Like" funcionalites to my desired view.

Here is the code which I have (link to a tutorial):

var mjhViews = mjhViews || {};

mjhViews.itemHtml = function (ctx) {
    // start with a <tr> and a <td>
    var returnHtml = "<tr><td colspan='3'>";

    returnHtml += "<h2>" + ctx.CurrentItem.Title + "</h2>";

    if (ctx.CurrentItem.MyCustomField) {
        returnHtml += "<p>" + ctx.CurrentItem.MyCustomField + "</p>";
    // close off our <td> and <tr> elements
    returnHtml += "</td></tr>";
    return returnHtml;

(function () {
    var mjhOverrides = {};
    mjhOverrides.Templates = {};

    mjhOverrides.Templates.Header = "<div id='MyCustomView'>";
    mjhOverrides.Templates.Item = mjhViews.itemHtml;
    mjhOverrides.Templates.Footer = "</div>";

    mjhOverrides.ListTemplateType = 100;
    mjhOverrides.BaseViewID = 1;


I spent few days on looking for solution so any help will be appreciated.


did quite the same in my environment.

enter image description here

You can take a look into my guideline I wrote here:


  • Google didn't catch that guide... What more can I say. I think this is my solution so thank you friend. – omygoodness Nov 25 '15 at 14:58
  • My blog isn't that popular by now. Hopefully google will catch up ;) If you still have questions, don't be afraIT to ask – Patrick Nov 25 '15 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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