Implementing Site Templates on SharePoint 2010
You may or may not know is that the Site Template (STP) is gone however there are some new activation procedures you should know about when implementing the new WSP Site Templates.
Real-Time Use – This allow you to upload and select a template during Site Collection creation time.
Site Collection Installation and Activation/Deactivation – This allows any site created within the Site collection to use a custom template.
Server Installation and Activation – This allows a template to be installed on the server and then activated as needed within a Site Collection.
In 2007 when you wanted to create a new Site Collection with a template, the site template needed to be installed globally before it could be utilized. That is not the case in SharePoint 2010. In 2010 you can choose to load a site template at Site Collection creation time. Take a look at how below.
This pertains to the creation of a new site collection, so you will need to execute whatever process you normally follow to make that happen.
I will focus on the process of using “Self Service Site Creation”.
When you enter the Self Service Site Creation create site collection page, you will focus your attention on the “Template Selection” group.
First click on the “Custom” tab, indicated in green below. Next make sure “Select Template Later” is chosen, then choose “Create” to create the site collection.
From here on out, anytime you go to the Site Collection, it will present you with the template selection screen.
See the “Solution Gallery” at the bottom? Click on it.
Now that we are in the Solution Gallery, welcome, we need to add the solution that we want to use. Click on the “Solutions” tab. Yes I know, it looks like it is already clicked, but click on it again for me.
Click on “Upload Solution”
Choose your solution (WSP) and upload.
WAIT DON’T CLICK “CLOSE”
Please click “Activate” to active the WSP so that it can be used to create a site.
You see the template is a feature and the feature needs to be activated. However in the case of the Solution you must do so from the Solution Management dialog.
Now click “Browse” and then the link for your new Site Collection.
This will return you to the Template selection page. Now click on the “Custom” tab again. However notice this time your site template is available to be chosen. Click it and create your site.
Site Collection Installation & Activation/Deactivation
What if you want to make the site template automatically available to all sites within a Site Collection. Those steps are simple, let’s go through them now.
Click on Site Settings in the Site Actions navigation drop down.
If you are not at the top level site collection, click on “Site Collection Administration” to get there.
Click on “Solutions”
Now that we are in the Solution Gallery, welcome, we need to add the solution that we want to use. Click on the “Solutions” tab. Yes I know, it looks like it is already clicked, but click on it again for me.
Click on “Upload Solution”
Choose your solution (WSP) and upload.
WAIT DON’T CLICK “CLOSE”
Please click “Activate” to active the WSP so that it can be used to create a site.
You see the template is a feature and the feature needs to be activated. However in the case of the Solution you must do so from the Solution Management dialog.
If you forgot to activate the Solution, return to the Solution Gallery and hover over the Solution and choose “Activate”.
Return to the previous step once in the “Solution Gallery – Activate Solution” dialog.
You are now ready to create site with this template. Unlike in the Real-Time Use implementation above, you can choose this template from the “New Site” Silverlight object creation wizard.
Once a solution has been activated in order to delete the solution you must first deactivate the solution. Any site currently created with the solution will continue to function if the solution has been deactivated, you just won’t be able to create any new sites with it.
You can deactivate a solution by entering the Solution Gallery, hovering over the solution, and choosing “Deactivate”.
Now click on the Deactivate button in the Dialog.
To delete the solution, hover over the solution and choose “Delete”.
Server Installation & Activation
What if you want to make a site collection available to all sites on the server, how can you do that with the new WSPs?
To do that you will need to use the “stsadm –o addsolution” command or the “Add-SPSolution <SolutionLocation/SolutionName>.wsp” powershell script.
Here are the steps to make a Site Template globally available.
First, are you a server admin? If not then these steps are not for you. If you are then here you go.
Open the “SharePoint 2010 Management Shell”
Place the WSP on your server to be added to the Farm Solutions Gallery.
Type “Add-SPSolution”
For LiteralPath, you are going to following these steps.
Locate your physical WSP file to be installed. Hold down your Left Shift key and right mouse click on the file to be installed. Choose “Copy as path”.
Back in your Management Shell, right mouse click and choose paste. You’ll notice that it pastes with quotes, not good. You’ll need to remove those. Delete the quotes from around the path and click enter.
Next you need to deploy the solution so that it can be activated in any site that wants to use it for it’s site collection.
Enter SharePoint Central Administration
Click on “System Settings”
Click on “Manage Farm Solutions”
Click on the Solution you want to deploy.
Click “Deploy Solution”
Click the “OK” button
User Solutions created are Global WSPs by default. As such you cannot specify a specific Web Application that you want to deploy to.
After you click OK your solution will be deployed and can now be used within any Site Collection within any Web Application. It isn’t that simple though, now we need to activate the Solution in the Site Collection where we want to use it.
IMPORTANT!!! – A deployed solution can be used for the top level of a site collection without having to upload it again. You can accomplish this by, choosing the option of Custom/Select Template Later when creating your site collection, and when the Template Selection page comes up, follow the same steps shown below. After following the steps, just return back to the URL of your Site Collection and choose the template you just activated. This is very simple to the Real-Time Use steps above, however you do not need to upload the solution again.
Activate Via the Site Collection Features
Now we are ready to activate our template inside of the Site Collection where we want to use it. Click on Site Settings in the Site Actions navigation drop down.
If you are not at the top level site collection, click on “Site Collection Administration” to get there.
Click on “Site Collection Features”
Click the “Activate” button next to the “Web Template feature of exported web template…” solution you want to be able to use for sites created in the Site Collection.
You are now ready to create a site with this template. Unlike in the Real-Time Use implementation above, you can choose this template from the “New Site” Silverlight object creation wizard.
3 Comments »
Leave a Reply
-
Archives
- January 2012 (2)
- November 2011 (1)
- October 2011 (1)
- July 2011 (1)
- August 2010 (1)
- June 2010 (1)
- May 2010 (8)
- April 2010 (4)
- March 2010 (1)
- February 2010 (1)
- January 2010 (4)
- November 2009 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS
Hi,
Is there anyway that I can change the feature name and do all the above said process through ststadm commands.
Is it possible to create a site from the created custom template using the new-spsite powershell command.
after following your steps and then running the get-spwebtemplate command I don’t see any reference to my custom template in the returned list.
cheers,
Colm
This was very useful. Thanks for explaining in detailed way…