Alexander’s Blog

September 24, 2008

Adding Templates for Top Level Sites in MOSS

by @ 2:17 pm. Filed under IIS, SharePoint, Tips & Tricks

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.
C:\Windows>iisreset

Attempting stop…
Internet services successfully stopped
Attempting start…
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.

Leave a Reply

*

Comment spam protected by SpamBam

Spam Protection by WP-SpamFree

Contact E-mail | Terms of Use | Privacy Policy

Copyright ©2002-2013 Zubair Alexander. All rights reserved.

Internal Links

Search Blog

Categories

Archives

July 2014
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSS Feeds

TechGalaxy Visitors

29 queries. 0.433 seconds