jslink only renders when I engage cisar inspector

56 Views Asked by At

Cisar verifies the jslink is getting called correctly but rendering only happens when I open the file with the cisar inspector. Weird.

(function () {


var overrideCtx = {};
overrideCtx.Templates = {};


overrideCtx.Templates.Header = "<div class='row'><div class='col-md-  8'>Title</div><div class='col-md-1'>Screen 16x9</div><div class='col-md-1'>Print</div><div class='col-md-2'>Updated</div>";
overrideCtx.Templates.Footer = "</div>";
overrideCtx.Templates.Item = CustomItem;


SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);

})();

function CustomItem(ctx) {
// Build a listitem entry for every announcement in the list.    
var ret = "<div class='col-md-8'>" + ctx.CurrentItem.Title + "</div><div class='col-md-1'><a href='https://domain/subsite/library/" + ctx.CurrentItem.FileLeafRef + "'><i class='fa fa-tv fa-2x'></i></a></div><div class='col-md-1'><a href='" + ctx.CurrentItem.Print_x0020_4x3 + "'><i class='fa fa-print fa-2x'></i></a> </div>" "<div class='col-md-2'>" + ctx.CurrentItem.Updated +  " </div>"
;

return ret;
}
0

There are 0 best solutions below