Default Templates List CSR - on RenderBody RRS feed

  • Question

  • Hello, guys,

    I need to create custom grouping. I will group by multi choice field(checkboxes). I have read a lot of articles about getting the templates of default fields and it looks like it's simple but when you overriding Fields, i need to override the whole body.

    Is there any way to get the default fields templates in "Body"?


    Here is the result:

    As you can assume this is definitely not good because i lose the default functionality. Is there any way to get the fields templates when overriding "Body" or i have to write my own implementation of these functions?

    Thank you in advance!

    Best Regards,

    Jordan Georgiev

    Thursday, February 16, 2017 8:53 AM

All replies

  • Hello, guys,

    I found a solution for this problem.

    Here is the solution:

    var spMgr = new SPMgr();

    var docIconHtml = spMgr.RenderFieldByName(ctx, "DocIcon", currentItem, ctx.ListSchema);

    var linkFilenameHtml = spMgr.RenderFieldByName(ctx, "LinkFilename", currentItem, ctx.ListSchema);

    SPMgr is object in clienttemplates.js file. All you need to do is create new object and pass the parameters as shown in the example and the method will return the default html for this field.

    I hope someone find this helpful.

    Best Regards,

    Jordan Georgiev

    Thursday, February 16, 2017 7:24 PM
  • Hi Jordan,

    Thanks for sharing, It will help others who suck with the problem!

    Best Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Friday, February 17, 2017 2:42 AM