(function () {
function registerRenderer() {
var ctxForm = {};
ctxForm.Templates = {};
ctxForm.Templates = {
Fields : {
'ShiftTurnOverParentLink': { //------ Change Hyperlink of LinkTitle
View : function (ctx) {
var url = ctx.CurrentItem.ShiftTurnOverParentLink//String.format('{0}?ID={1}', "/sites/SiteName/Lists/ListName/EditForm.aspx", ctx.CurrentItem.ID);
return String.format('<a href="'+ctx.CurrentItem.ShiftTurnOverParentLink+'">Shift Turnover ID</a>', url, ctx.CurrentItem.Title);
}
},
'View': { //------ Change Hyperlink of LinkTitle
View : function (ctx) {
var url = ctx.CurrentItem.View//String.format('{0}?ID={1}', "/sites/SiteName/Lists/ListName/EditForm.aspx", ctx.CurrentItem.ID);
return String.format('<a href="'+ctx.CurrentItem.ShiftTurnOverParentLink+'">View</a>', url, ctx.CurrentItem.Title);
}
},
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(ctxForm);
}
ExecuteOrDelayUntilScriptLoaded(registerRenderer, 'clienttemplates.js');
})();
Comments
Post a Comment