Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 : multiple ListView webpart issue with JSLink

$
0
0

Hi,

Scenario :

I have 2 list view webparts(LWP1 and LWP2) on same page and one list view webpart(LWP1) having JSlink property configured (by which I am providing some style to fields and items). both webpart having template Links.

Now for another webpart(LWP2) if I dont supply any JSLink (or even I apply) still it's using first one's(LWP1's) JS function and rendering accordingly that.

I configured LWP1 by using BaseViewID and ListTemplateType. However LWP2 rendering as per same JS style as in LWP1.

(function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};
  
    overrideCtx.Templates.Item = CustomItem;
    overrideCtx.BaseViewID = 1;
    overrideCtx.ListTemplateType = 103;
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();

Please suggest how to fix this.

Thanks in advance!

Regards.



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>