Forum Discussion
John Aage Andersen
Sep 09, 2016Iron Contributor
JSlink not applying on list view web part! Where to store? How to correctly refer to it?
We have a customers list and on one page we have added the list view webpart. The list is shown with the name and other columns. We have a javascript display template (JSlink). We have stored t...
Sep 09, 2016
This location is good or you could think to store in the master page gallery of your site. In regards of how to reference the JavaScript file, the ListViewWebPart has a property where you can specify the Url path of the JavaScript path
John Aage Andersen
Sep 09, 2016Iron Contributor
Thanks Juan
We will then keep that location for the javascript files.
But how exactly are the javascript files in that location to be referenced from inside the JSlink entry field?
Enjoy, John
- Brent CaudillSep 09, 2016Copper Contributor
• When referencing the JS file in the JS Link field in the Web Part properties you need to use the ~sitecollection token:
~sitecollection/Library/jslink.js
~sitecollection/site/Library/jslink.js- Sep 09, 2016Brent is correct!