Author: Michael Koger
Date: Oct 27, 2016
This is the first post in a series on JS Link, where we explain what JS Link is, how it can be applied to different objects in a SharePoint site, and how the rendering actually takes place. Future posts will contain code samples and will discuss how JS Link can be used to customize the rendering of List Views, List Forms, and individual List Fields.
What is JS Link and why do we care?
Advantages of Client-Side Rendering:
- Performance – since the rendering is done on the client side, the burden is taken away from the server. This means that the pages can load faster when using CSR.
Examples of JS Link and Client-Side Rendering Solutions:
Tasks with Percent Complete
Tasks with Colored Priority
Documents with Icon
How do we apply JS Link?
There are a number of objects that can be used to attach JS Link references to. This list includes, but is not limited to:
- Site Columns
- Content Types
- List Views
- List Forms (e.g. New / Edit / Display forms)
- List View Web Parts
- List Form Web Parts
Apply JS Link Script
You can also apply more than one JSLink reference at a time by separating each reference with the pipe | symbol.
In the next post in the series, I plan on looking at some real-world examples of how JS Link and Client-Side Rendering can be used to implement custom field and view rendering.