Advertisement
Guest User

SharePoint CSR file template

a guest
Oct 8th, 2015
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() {
  2.  
  3.   function init() {
  4.  
  5.     SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
  6.  
  7.       // OnPreRender: function(ctx) { },
  8.  
  9.       Templates: {
  10.  
  11.       //     View: function(ctx) { return ""; },
  12.       //     Header: function(ctx) { return ""; },
  13.       //     Body: function(ctx) { return ""; },
  14.       //     Group: function(ctx) { return ""; },
  15.       //     Item: function(ctx) { return ""; },
  16.       //     Fields: {
  17.       //         "<fieldInternalName>": {
  18.       //             View: function(ctx) { return ""; },
  19.       //             EditForm: function(ctx) { return ""; },
  20.       //             DisplayForm: function(ctx) { return ""; },
  21.       //             NewForm: function(ctx) { return ""; },
  22.       //         }
  23.       //     },
  24.       //     Footer: function(ctx) { return ""; }
  25.  
  26.       },
  27.  
  28.       // OnPostRender: function(ctx) { },
  29.  
  30.       //ListTemplateType: 100
  31.  
  32.     });
  33.   }
  34.  
  35.   RegisterModuleInit(SPClientTemplates.Utility.ReplaceUrlTokens("~siteCollection/Style Library/test.js"), init);
  36.   init();
  37.  
  38. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement