How to find which template is used for a site or a page in SharePoint

How/where can I find the template used for a SharePoint site or page.

I have a page I want to resemble, but I don't know where to find the template for that page and site?


Once you view the page source and search for "var g_wsaSiteTemplateId" you will find a code, such as STS#0 or STS#1 etc... to find out what the template code means you can look at the table below taken from: absolute-sharepoint.com

Template ID              | Title
------------------------  -----------------------------------------------------------
GLOBAL#0                 | Global template
STS#0                    | Team Site
STS#1                    | Blank Site
STS#2                    | Document Workspace
MPS#0                    | Basic Meeting Workspace
MPS#1                    | Blank Meeting Workspace
MPS#2                    | Decision Meeting Workspace
MPS#3                    | Social Meeting Workspace
MPS#4                    | Multipage Meeting Workspace
CENTRALADMIN#0           | Central Admin Site
WIKI#0                   | Wiki Site
BLOG#0                   | Blog
SGS#0                    | Group Work Site
TENANTADMIN#0            | Tenant Admin Site
APP#0                    | App Template
APPCATALOG#0             | App Catalog Site
ACCSRV#0                 | Access Services Site
ACCSRV#1                 | Assets Web Database
ACCSRV#3                 | Charitable Contributions Web Database
ACCSRV#4                 | Contacts Web Database
ACCSRV#5                 | Projects Web Database
ACCSRV#6                 | Issues Web Database
ACCSVC#0                 | Access Services Site Internal
ACCSVC#1                 | Access Services Site
BDR#0                    | Document Center
DEV#0                    | Developer Site
DOCMARKETPLACESITE#0     | Academic Library
EDISC#0                  | eDiscovery Center
EDISC#1                  | eDiscovery Case
OFFILE#0                 | (obsolete) Records Center
OFFILE#1                 | Records Center
OSRV#0                   | Shared Services Administration Site
PPSMASite#0              | PerformancePoint
BICenterSite#0           | Business Intelligence Center
SPS#0                    | SharePoint Portal Server Site
SPSPERS#0                | SharePoint Portal Server Personal Space
SPSPERS#2                | Storage And Social SharePoint Portal Server Personal Space
SPSPERS#3                | Storage Only SharePoint Portal Server Personal Space
SPSPERS#4                | Social Only SharePoint Portal Server Personal Space
SPSPERS#5                | Empty SharePoint Portal Server Personal Space
SPSMSITE#0               | Personalization Site
SPSTOC#0                 | Contents area Template
SPSTOPIC#0               | Topic area template
SPSNEWS#0                | News Site
CMSPUBLISHING#0          | Publishing Site
BLANKINTERNET#0          | Publishing Site
BLANKINTERNET#1          | Press Releases Site
BLANKINTERNET#2          | Publishing Site with Workflow
SPSNHOME#0               | News Site
SPSSITES#0               | Site Directory
SPSCOMMU#0               | Community area template
SPSREPORTCENTER#0        | Report Center
SPSPORTAL#0              | Collaboration Portal
SRCHCEN#0                | Enterprise Search Center
PROFILES#0               | Profiles
BLANKINTERNETCONTAINER#0 | Publishing Portal
SPSMSITEHOST#0           | My Site Host
ENTERWIKI#0              | Enterprise Wiki
PROJECTSITE#0            | Project Site
PRODUCTCATALOG#0         | Product Catalog
COMMUNITY#0              | Community Site
COMMUNITYPORTAL#0        | Community Portal
SRCHCENTERLITE#0         | Basic Search Center
SRCHCENTERLITE#1         | Basic Search Center
SRCHCENTERFAST#0         | FAST Search Center
visprus#0                | Visio Process Repository

On Salaudeen Rajack`s blog www.sharepointdiary.com there is a tutorial with explained 6 ways to determine a SharePoint Site Template. The link can be found here.

Cited:
  1. Use SharePoint Manager, Navigate through the site, and look for "Web Template".

  2. Stsadm: stsadm.exe -o enumallwebs -databasename > Template.txt Now, Open the template.txt file and check for template. This trick can be used to find site template name for SharePoint 2010 even.

  3. Sql Server: Sql server is the back-bone of SharePoint, So SELECT Title, WebTemplate FROM dbo.Webs WHERE Title='Your Site'

  4. You can use SharePoint Object Model find site template of a SharePoint site. Just query SPWeb.WebTemplateId.

  5. SharePoint 2010 - find template used create site: In SharePoint 2010, You can get the list of site templates by using a PowerShell Cmd-let: Get-SPWebTemplate . Examples for listing Web Templates:

    Get-SPWebTemplate -Identity SGS#0

    Get-SPWebTemplate -Identity S*

    Get-SPWebTemplate | ? { $_.Name -like "*STS*" }

  6. Go to the view source of the SharePoint page >> Search for "SiteTemplateID" to find site template name SharePoint 2010.


The easiest way is to get a tool like SharePoint Manager. Go into the site you are looking at, and find the WebTemplateId property. You can then match it up to a list of known template types.

There is another way to do it, but it is much more manual (and ugly) so I won't outline it here.

As far as a page template goes - this only works on pages within a Publishing site (in the Pages library...) but you should be able to look at the ContentType field in the Properties for a page in SPM. If you are looking at a pages library, you can even just add Content Type to the view directly within SharePoint and get the same information.


To get Name of the existing site template {Name of the Site Template} follow the below steps

  1. Save a Site as a Template.

  2. Go to Site settings –> sites & workspaces –> create.

  3. IE Tools > Developer Tools > Find > Select Element By Click > View > Source > DOM (Element) > Highlight and copy the section test . The one in bold will be your site template name.


For Pages

If you open the site in SharePoint Designer, then checkout the page you want for editing it will ask you if you want to edit the content (via the website) or edit the layout (via SharePoint designer)

Not sure what exactly you want to do by knowing the template for the site.

Re: Comments

Which do you want to open? A page or a site? These are different things.

To get the LAYOUT PAGE for any given SharePoint page, you need to find that page you are curious about in SharePoint designer. Double click it and when you do SPD will ask you if you want to edit the content (and if so, take you to the web browser interface) or if you want to edit the layout (if you have enough permission). If you edit the layout another copy of SPD is opened and the layout file is checked out. Look in the file window for the name of the layout.