I’ve noticed that many SharePoint developers don’t know the concept of WebTemplate.
In SharePoint 2007, we could define site definitions (in onet.xml files) and deploy them to a farm; the site definition ended up in the file system.
Now in SharePoint 2010, we have the very promising sandbox that allows us to run applications & customizations (including .Net code) in the Cloud (the SharePoint Online part of Office 365) among others.
Since files cannot be deployed on the file system in a sandbox for obvious reasons, Microsoft provide the best of both worlds with the WebTemplate feature element.
Also a huge difference between site templates and WebTemplate is that WebTemplates can use publishing features .
One of the main inconvenient of WebTemplate is that they cannot be part of variations.
In elements.xml :
In Onet.xml (I’ve just copied and paste the Onet.xml of the STS template)
You can download my project here.
- Create a custom WebTemplate :
- More details about WebTemplate :
- Web Templates and Sites definitions :