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

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). List1 of LWP1 is having template Links.   List2 of LWP2 is having template Custom List. 

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

I configured LWP1 by using BaseViewID and ListTemplateType. Though LWP2 having no relatation still it is impacted and rending as per JSLink function defined 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 25064

Latest Images

Trending Articles



Latest Images