If you try to install a custom template at the top level site in Microsoft Office SharePoint Server (MOSS) 2007 that either you have saved or downloaded from the Internet, you will notice that the option for installing a custom template is not available. However, once you have created a top level site then you can create a subsite and add a custom template for that subsite. There are several scenarios where you may want to use a custom template at the top level site. The procedure for adding a template at the top level site is surprisingly simple. Here’s how.
Create a template, or if you have downloaded a template (.stp) file you can add it to the top level site in SharePoint by using the following command:
stsadm.exe -o addtemplate -filename your_template_file -title “friendly name” -description “template description“
You will find stsadm.exe in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN folder. The best thing is to add this location to the path in the environment variables so you can execute it from any folder at the command prompt.
For example, I downloaded the User Group template from Community Kit for SharePoint (http://sharepoint.microsoft.com/sharepoint/cks/default.aspx). I installed the .stp file using the following command.
C:\Windows>stsadm.exe -o addtemplate -filename cks_uge_1.0.stp -title “User
Group Template” -description “User Group Template from CKS”
Operation completed successfully.
IIS must be restarted before this change will take effect. To restart IIS, open a
command prompt window and type iisreset.
Internet services successfully stopped
Internet services successfully restarted
At this point you will be able to see the custom tab for templates when you create a new top level site in SharePoint. If you want to delete the template you just added, you can use the following command.
stsadm.exe -o deletetemplate -title “User Group Template”
Notice that you do not need to provide the path or description, just the title.
Copyright ©2002-2013 Zubair Alexander. All rights reserved.
29 queries. 0.433 seconds