Last active
January 3, 2016 21:30
-
-
Save arjancornelissen/1ddfe597f984493d1068 to your computer and use it in GitHub Desktop.
Blog CSR basics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type.registerNamespace('Arjan'); | |
Arjan.Demo = Arjan.Demo || {}; | |
Arjan.Demo.Templates = Arjan.Demo.Templates || {}; | |
Arjan.Demo.Functions = Arjan.Demo.Functions || {}; | |
Arjan.Demo.Templates.Header = function (context) { | |
return""; | |
} | |
Arjan.Demo.Templates.Footer = function (context) { | |
return""; | |
} | |
Arjan.Demo.Templates.Item = function (context) { | |
return""; | |
} | |
Arjan.Demo.Templates.Group = function (context, group, groupId, listItem, listSchema, level, expand) { | |
return""; | |
} | |
Arjan.Demo.Functions.RegisterField = function () { | |
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(Arjan.Demo); | |
} | |
Arjan.Demo.Functions.MdsRegisterField = function () { | |
var thisUrl = _spPageContextInfo.siteServerRelativeUrl + "style library/faq.js"; | |
Arjan.Demo.Functions.RegisterField(); | |
RegisterModuleInit(thisUrl, Arjan.Demo.Functions.RegisterField); | |
} | |
if (typeof _spPageContextInfo != "undefined" && _spPageContextInfo != null) { | |
Arjan.Demo.Functions.MdsRegisterField(); | |
} else { | |
Arjan.Demo.Functions.RegisterField(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment