Deploying site definitions to a SandBox ? use the new WebTemplate tag

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.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s