- 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.
- 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.
- 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(); }
- 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] - 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'
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.
Good one. Helps me find some properties of the site.
ReplyDeleteYou might like to add that the FAST Search Center is ID 2000 in SP2010.
ReplyDeleteIf you use SharePoint 2010 and have administrative access to the sharepoint server, you can also start the SharePoint Management Console (Powershell) and type the following commandlet
ReplyDeleteGet-SPWeb -Identity | format-list
Make sure you replace with the full url of the web you would like to list, e.g. https://mysite.com/myweb
Look for the properties WebTemplateName and Configuration. For a teamsite, for example, the WebTemplateName will be STS and the Configuration 0. (Config 0 is a teamsite, Config 1 is a blank site, Config 2 is a document workspace, etc.)
In the 4th point above mentioned is
ReplyDeletestsadm.exe -o enumallwebs -databasename [content database name]
it is written as
stsadm.exe -o enumallwebs -database [content database name
This is some great information. However it is not possible to know if the original site template was blank or teamsite. It looks like Metalogix are able to make the difference. See the screen shot: http://www.softpedia.com/progScreenshots/Metalogix-SharePoint-Site-Migration-Manager-Screenshot-125867.html
ReplyDeleteDo you have an idea how they could figure it out?
Hi, this was some great information. All of the options listed together. Didn't have to look anywhere else.. Thanks. Keep up the good work.
ReplyDeleteThanks ! I found exactly what I was looking for.
ReplyDeleteThanks ! I found exactly what I was looking for.
ReplyDeleteHelpful post. Thanks!
ReplyDeleteNice and helpful post. Thanks!
ReplyDeleteTo get the list of globally installed templates, we can also use the "get-spwebtemplate" powershell cmdlet.
I'm trying to distinguish in search results certain sites that were create using a custom template. Do you think it's possible?
ReplyDeletegreat post!
ReplyDeletethanks.
#5 should also output ProvisionConfig, then we'll be able to identify whether it's Blank or Team site or Document workspace.
ReplyDeleteGreat article! Thank you!
Another simple method to get the site template of a site is to simply append: _vti_bin/owssvr.dll?Cmd=GetProjSchema
ReplyDeleteto the url and get the current ONET xml schema that is applied to that site. THe "Project Title=" field gives the name of the site template used.
Oh my goodness, SO much easier!! Thanks!!
DeleteOr just go to any page and view source. Find "var g_wsaSiteTemplateId" and that is set to a value that maps to the type of template used.
ReplyDeleteCredit: http://nickhobbs.wordpress.com/2013/05/18/sharepoint-how-to-check-which-site-template-was-used-to-create-a-site-just-using-a-web-browser/
This was all very interesting (and overwhelming) and I was wondering if soemthing similar was available to find what template a DOCUMENT LIBRARY was created from?
ReplyDeleteI am trying to find out if the library in question was created from the standard template or a customised template.
Any help would be appreciated.
Thank you