How to find the template name of sharepoint site?
- Hi,
I have sharepoint site which is fully customized.
I would like to know the template name of site, because the sharepoint site is created by some body else I don't know which template the guy had selected (like team site, blank site, publishing, collboration site etc.) while creating the site
Can anybody help me how to find the sharepoint template name.
Reply's always appreciated
Thanks and Regards,
G Vijai Kumar
Answers
- Hi,
I found the solution
Please follow the steps to know the template name of sharepoint site:Code Snippet<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<script runat="server">
protected override void OnLoad(EventArgs e){
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb thisWeb = this.Web)
{
lblWebTempalte.Text = thisWeb.WebTemplate;
lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
}
});
}
</script>
<asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >
<p>
Web Template: <asp:Label ID="lblWebTempalte" runat="server" />
</p>
Web Template ID: <asp:Label ID="lblWebTemplateID" runat="server" />
</asp:Content>
<asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
Site Template Information
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
Site Template Information
</asp:Content>
- Save the code snippet code as .aspx page ( eg:webtemplate.aspx) to your layouts folder (usually C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS)
- Once the page is saved you can access it from any of your sharepoint sites via http://servername/_layouts/webtemplate.aspx
- Compare the web template ID with the below List of MOSS 2007 Template ID Information
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"
For more information please visit
http://blog.rafelo.com/2008/05/determining-site-template-used-on.html
http://www.frontpages-web-hosting.net/forums/microsoft-office-sharepoint-server-2007-moss-2007-development-topics/486-moss-2007-template-id-information.html
Thanks and Regards,
G Vijai Kumar- Marked As Answer byJeff Feng -MSFTMSFT, ModeratorTuesday, July 29, 2008 10:25 AM
All Replies
A quick way to view the onet.xml which was used to create the site is using RPC.
Append /_vti_bin/owssvr.dll?Cmd=GetProjSchema to the end of the url of your site to get it.
Example: http://myserver/sites/mysites/_vti_bin/owssvr.dll?Cmd=GetProjSchema
Hope this helps.
Question on my turn: Adding webpart to Newform.aspx using "?PageView=Shared&ToolPaneView=2" doesn't break the support MS? Is it supported?
- Hi Gerard,
Thanks for the reply.
Adding webpart to Newform.aspx is supported
Append the text ?PageView=Shared&ToolPaneView=2 after Newform.aspx
Example: http://servername/Lists/Tasks/NewForm.aspx?PageView=Shared&ToolPaneView=2
My question: I am able to view .xml file by appending the text /_vti_bin/owssvr.dll?Cmd=GetProjSchema to the end of the url
But I cannot view the template name in the .xml file.
My requirement is to know the template name whether the site is created with team site, blank site, collaboration portal etc.,
Reply's always appreciated
Thanks and Regards,
G Vijai Kumar Hi..Sorry if i asking some noob question here..which file .aspx shud i open to customize the code for Document Workspace template?
all my site templates is under this path :
\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates
- Hi,
Please let me clear, what kind of customization you would like to do for Document Wrokspace template?
Are you looking to customize the look and feel of Non-Layouts pages or Layouts pages?
Thanks and Regards,
G Vijai Kumar
as for now i just wan to turn on versioning setting in major version and turn on "Yes" box for required check out before editing the files..I need to be done this by automatically once i cr8ed the document workspace..Default value is "no" for versioning and "no" for required check out..- Hi,
I found the solution
Please follow the steps to know the template name of sharepoint site:Code Snippet<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<script runat="server">
protected override void OnLoad(EventArgs e){
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb thisWeb = this.Web)
{
lblWebTempalte.Text = thisWeb.WebTemplate;
lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
}
});
}
</script>
<asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >
<p>
Web Template: <asp:Label ID="lblWebTempalte" runat="server" />
</p>
Web Template ID: <asp:Label ID="lblWebTemplateID" runat="server" />
</asp:Content>
<asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
Site Template Information
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
Site Template Information
</asp:Content>
- Save the code snippet code as .aspx page ( eg:webtemplate.aspx) to your layouts folder (usually C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS)
- Once the page is saved you can access it from any of your sharepoint sites via http://servername/_layouts/webtemplate.aspx
- Compare the web template ID with the below List of MOSS 2007 Template ID Information
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"
For more information please visit
http://blog.rafelo.com/2008/05/determining-site-template-used-on.html
http://www.frontpages-web-hosting.net/forums/microsoft-office-sharepoint-server-2007-moss-2007-development-topics/486-moss-2007-template-id-information.html
Thanks and Regards,
G Vijai Kumar- Marked As Answer byJeff Feng -MSFTMSFT, ModeratorTuesday, July 29, 2008 10:25 AM
