Monday, June 2, 2014

Upgradable Sharepoint Webtemplates - Introduction

Hi Readers,

This post is about creating web templates that are upgradable, the method I'm using here is using several features to upgrade the site template.

Let's see the requirement for this, think that your client has a requirement for creating a team site which has a template that is different from the out of the box team site, this may include the contents of the site or even the structure of the site. Your client may ask for a set of lists and libraries that are to be created when a new site is created and the site may have pages that are to be created and webparts are to be placed at those pages.

It may sound simple and you may think that creating a simple site and saving the web template will do the trick, well at some times it will but what if your client comes up with a new library to be added to all the site that are created ?.

Of course you can create a new template after adding the new library, then what happens to all the sites that are already created ?, you may go to each and every site and create the library, what if there are hundreds of sites created ? , will it be practical to go to each site and add the library the answer is No because nobody is ready to do a task like this, You may of course use powershell script or a simple console application to do this but even that may not be possible in production environments.

So lets go to the solution, that is creating a web template and using several features to deploy the content and structure by doing this you can simply update the sites that are created and the site are to be created in the future.

This blog post series will have three more posts
1. Updating lists, adding lists
2. Updating webparts
3. Updating Webpart pages

The concept behind this is Feature Updating and all this is done using sandboxed solutions because it will work in Sharepoint Online as well.
I'm going to create 3 different features and show how to update them, when you create the site you can simply activate them and create a template from it and by upgrading the features you can simply update the sites.

Only problem you may face here is activating a new feature to existing sites, that of course will have to be done using the powershell.

Hope you find this post useful.
-Guruparan-

No comments:

Post a Comment