Know the site template used for the SharePoint site

Hello all, Hope all are doing fine. I believe this is very rarely needed post that we need to know what site template [Publishing site, workspace, meeting workspace, team portal etc..] was used for a particular SharePoint site. From the UI [means by navigating to SharePoint site through browser] we can't identify this. So, we need to follow either of the steps given below to identify the template used for a specific site.
  1. First option is, this is my recommended choice and very easy too. By using SharePoint Manager tool [available for both 2010 and 2007.] Download it for free from Codeplex and install it. Now, open the SharePoint Manager and connect to the SharePoint site collection. When you click on a specific SharePoint site, on the right side it will show you all the properties available in the SP object model for that site. In it find for TemplateID and check the value showing there. That's it. What is TemplateID and how to know template name from it? Navigate to end of this post for TemplateID to Name mapping.
  2. Second option is, if there is no way to install SharePoint manager or if any other problems, then save the current site as site template[.STP extension]. Now, save it to disk somewhere. Now, navigate to that location and rename the file to .CAB extension. Extract the CAB file and find the manifest.xml file. Now, in the file check for the TemplateID string and get the value. Navigate to end of this post for the TemplateID to Name mapping.
  3. From the SP Object Model: Through managed code we can identify this very easily with below code.
    using (SPWeb web = site.OpenWeb("/"))
    {
    string templateID = web.WebTemplateId.ToString();
  4. Using STSADM.EXE: It needs high level permissions. Means the user should be an administrator on the server. Below is the command we need to use for knowing the site template.
    stsadm.exe -o enumallwebs -database [content database name]
  5. From Sql Server: Sql server has all the information about SharePoint. So, if you have access to database then login to the sql server management studio and execute below query on the content database of the application.
    SELECT Title, WebTemplate FROM dbo.Webs WHERE Title='Test Publishing Site'
Choose one option which is useful or easy for you and identify the correct template.

Site template ID to Name mapping:
0 - GLOBAL (SetupPath=global) - "Global template"
1 - STS - "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"
2 - MPS - "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"
3 - CENTRALADMIN - "Central Admin Site"
4 - WIKI - "Wiki Site"
7 - BDR - "Document Center"
9 - BLOG - "Blog"
20 - SPS (OBSOLETE) - "SharePoint Portal Server Site"
21 - SPSPERS - "SharePoint Portal Server Personal Space"
22 - SPSMSITE - "Personalization Site"
30 - SPSTOC (OBSOLETE) - "Contents area Template"
31 - SPSTOPIC (OBSOLETE) - "Topic area template"
32 - SPSNEWS (OBSOLETE) - "News area template"
33 - SPSNHOME (SubWebOnly) - "News Home template"
34 - SPSSITES - "Site Directory area template"
36 - SPSCOMMU (OBSOLETE) - "Community area template"
38 - SPSREPORTCENTER - "Report Center Site"
39 - CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING) - "Publishing and Team Collaboration Site"
40 - OSRV (SetupPath=SiteTemplates\OSRV) - "Shared Services Administration Site"
47 - SPSPORTAL - "Corporate Intranet Site"
50 - SRCHCEN - "Search Center"
51 - PROFILES - "Profiles"
52 - BLANKINTERNETCONTAINER - "Internet Presence Web Site"
53 - BLANKINTERNET - "Publishing Site", "Press Releases Site", "Publishing Site"
54 - SPSMSITEHOST - "My Site Host"
90 - SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE) - "Search Center Lite"
6221 - PWA (SetupPath=SiteTemplates\PWA) - "Project Web Access Site"
6215 - PWS (SetupPath=SiteTemplates\PWS) - "Project Workspace"
14483 - OFFILE - "Records Repository", "Records Repository"

Hope you like this post and will write more these kind of posts. We know plenty of things but some of the things are very hard to find. I will post all those kind in my blog. Keep checking the blog.

0 komentar:

Post a Comment

Related Posts with Thumbnails
GiF Pictures, Images and Photos