Forum Discussion

David Grooms's avatar
David Grooms
Copper Contributor
Apr 25, 2017

PnP Provisioning template to automate sites

I'm currently using the XMLTemplateProvider class to load an xml template and apply it to the site. This works fine.

The issue is that this interface only takes a file and I'd like to store the model templates in a SharePoint list.

 

So I have to read the bytes from SharePoint and write a local temp file then delete it when the provisioning is complete.

 

I saw the class SPSiteTemplateManager

 

it looked like this might be able to load the template directly from a SharePoint list, but I haven't found any additional information on how I might use this.

 

Is this feasable and if so is there any kind of sampel code or documentation around this ?

 

Thanks

Resources