Expand Minimize

Web Templates

Provides information about deployed Fields.

CheckId SPT607701
TypeName WebTemplateInventory
Severity Information
Type WebTemplates

In the Add-In model the concept of a web templateis not available anymore. Web Templates have many complexitiesand limitations that makes it hard to create them but also to maintain them.

One of the limitations is that features which have been stapled to the base site definition are not processed. This means that if you create a webtemplate based upon the Team Site template (STS#0) and you create new site based upon this new web template, that you might see changes between the newly created site and a team site that has been created with the STS#0 template. As Microsoft continuously makes changes to the SharePoint product, by among others stapling features to existing site templates, you will not receive that additional functionality in your new sites created based upon your webtemplate.

Office 365 only allows you to deploy a webtemplate when being packaged in a sandboxed solution. This means that you have the additional administrative task of provisioning the sandboxed solution to all site collections where you want to use that webtemplate.

As a general recommendation one should consider moving away from using webtemplates. If the target environment is SharePoint Online then webtemplate can work, but be aware of the maintenance overhead it its challenges with keeping them up to date.

An alternative to a site definition can be the Office 365 Patterns and Practices provisioning engine. While other technologies are available, each having their own approach to provisioning, the open-source PnP Provisioning Engine provides a declarative approach which is very similar to a site definition that uses an onet.xml file

We do not provide direct code examples, given the complexity and size of the code generated. If you are interested in converting the various artifacts that are present in the site definition, we want to refer to the artifact-specific code samples available after analyzing your solution.

However, we do provide a conversion of your onet.xml to the Provisioning Engine template schema.

In order to provide similar functionality as provided by Central Administration, we recommend you to create a custom application that allows users to select a template. Using CSOM you can then create a site collection and after that either programmatically or through the provisioning engine provision the required artifacts.

The Office Developer Patterns and Practices effort provides the Partner Pack, which is a solution that allows you relatively easy setup a hosted application that can provide site creation capabilities based upon templates that are created for the provisioning engine.

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.