Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Posts Tagged ‘js link’

JS Link for Web Parts

Posted by Paul on August 1, 2014

SharePoint 2013 has a new CSR (Client Side Rendering) support through the JS Link property for web parts.

What is JS Link?

JS Link is a property available for web parts.  We can specify a client side script file here.  The scrip will be executed once the page gets loaded; on the client side.

This feature enables us to quickly associate JavaScript & JQuery files rather than using the Content Editor web part.

How to set the JS file?

Open a list or library and choose Edit Page > Edit Web Part option.

image

Open the Miscellaneous tab and you will see the JS Link.

image

You can set your client side script file for this property.

image

~sitecollection

We can use the pre-defined ~sitecollection for accessing the site collection path.

References

http://msdn.microsoft.com/en-us/library/office/jj193034(v=office.15).aspx

Summary

In this post we have explored the JS Link property and its usage.  I hope this will help you take advantage of the SharePoint 2013 features.

Advertisements

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »