Here we will discuss how to add multiple js files in JSLink in SharePoint 2013/2016/Online. We can easily give js file path in the JSLink option in list view web part in SharePoint. But sometimes we may need to load multiple js files in jslink in SharePoint 2013/2016/Online.
How to Load multiple js file in JSLink
JSLink which is a new feature in SharePoint 2013 allows us to override the default rendering. We can easily use JSLink to override the default rendering of List view web parts in SharePoint Online. In SharePoint 2013/2016/Online, JSLink works on JS and HTML, so it is easy to override the default rendering.
To give a path of a js file in JSLink, the first we need to edit properties of the list view web part and then under Miscellaneous section, we can add the js link path like below:
~site/SiteAssets/mydemojslink.js
And the web part properties looks like below:
But sometime you may need to give multiple files if you want to load any other scripts.
We can add multiple files by simply using a pipe symbol between these files.
~site/SiteAssets/mydemojslink.js|~site/SiteAssets/myanotherdemojslink.js
You may like following jslink in SharePoint 2013 tutorials:
- Make Title field read-only using SPClientTempltes and JSLink in SharePoint Online
- SharePoint Online: Change SharePoint ListView To Jquery Accordion Using JSLink Client Side Rendering
- SharePoint 2013/2016/Online: Working with JSLink Templates Fields
- SharePoint 2013 jslink list view examples: Add header and footer to list view web part using JSLink in SharePoint Online/2013/2016
- Customize list view using jslink in SharePoint 2013/2016/Online
- How to use JSLink in SharePoint 2013/2016/Online
- SharePoint Online Branding: Display List items into page using AngularJS and REST API in SharePoint online or SharePoint 2016/2013
Hope this will be helpful to load multiple js files in jslink in SharePoint Online/2013/2016.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com