1

I have a very weird issue, working fine for last 4 years and now unable to resolve.

List called tools, has its own custom views. I add the list webpart to the page, set the view (Business Systems) and add JSlink. Now as soon as I add another webpart, it default takes the first webpart view and style. I want to set this with totally different view (Inquires) and Jslink. Total stumped and received no help from Microsoft. If I change the view for the second web part, the first one also gets changed.If I don't add JSlink, views load correctly. Any helps is appreciated. Thanks

enter image description here

enter image description here

enter image description here

enter image description here

1

When there are multiple webparts on the same page and at least one of them has a configured jslink, the jslink will be applied to all webparts on the page. This is obviously ridiculous since you're setting it specifically in the webpart properties, but it wouldn't be the first or last ridiculous thing that SharePoint has done.

To work around it, it each jslink file needs to wrap it's actions with an if (ctx.ListTitle == 'name of the list you actually want it to affect').

Here is an example scenario: http://www.benprins.net/2017/06/12/sharepoint-jslink-multiple-web-parts-on-a-page/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.