I am looking for CSR Documentation. If I Google something from the Server-Side API, I get the documentation right away.
For example, Googling
SPWeb, the first result is the documentation: https://msdn.microsoft.com/library/Microsoft.SharePoint.SPWeb.
However, when I try the same thing withCSR functions, I get examples but no documentation.
A couple of things that I hope documentation will clear up: In the following code I have 2 issues:
SPClientTemplates.TemplateManager.RegisterTemplateOverrides()expects an object. Where can I find a complete list of the keys and what I can expect them to do?Where did
RenderItemTemplatecome from? After sifting through a number of examples, I just happened to come acrossRenderItemTemplate. It isn't associated with an object, so there could be a whole bunch of helpful global functions that I know nothing about.function () { var itemCtx = {}; itemCtx.Templates = {}; itemCtx.Templates.Header = HeaderOverrideFunc; itemCtx.Templates.Item = ItemOverrideFun; itemCtx.Templates.Footer = FooterOverrideFunc; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(itemCtx); })(); function ItemOverrideFun(ctx) { if (ctx.ListTitle != "My List") { return RenderItemTemplate(ctx); } return "<li style='background-color: #52D017;width: 300px;height: 24px;'>" + ctx.CurrentItem.Title + "</li></span>"; }