by Andreas

Sharepoint 2010 – SPWebTemplate overview

When programmatically creating new sites you define which template to use by referring to its name, ID or with an instance of the actual template class. To list the templates available in your solution, use the following code:

SPWebTemplateCollection coll = site.GetWebTemplates(uint.Parse(System.Threading.Thread.CurrentThread.CurrentUICulture.LCID.ToString()));
foreach (SPWebTemplate tmpl in coll)
{
    ... // knock yourself out

This will loop the template collection (including your own custom ones). To save you a bit of hassle I will list all the standard templates shipped with Sharepoint 2010. When creating a new site, just refer to the template name (for instance “CMSPUBLISHING#0” for a publishing site) like this:

SPWeb myNewSubSite = web.Webs.Add(uniqueUrl, subSiteTitle, "", uint.Parse(System.Threading.Thread.CurrentThread.CurrentUICulture.LCID.ToString()), "CMSPUBLISHING#0", false, false);

Here are the 50 standard templates, with index, name and description. Please note that you’re not guaranteed that your index matches mine…

[0]        "GLOBAL#0 : This template is used for initializing a new site."    string
[1]        "STS#0 : A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions."    string
[2]        "STS#1 : A blank site for you to customize based on your requirements."    string
[3]        "STS#2 : A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document."    string
[4]        "MPS#0 : A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents."    string
[5]        "MPS#1 : A blank meeting site for you to customize based on your requirements."    string
[6]        "MPS#2 : A site for meetings that track status or make decisions. It provides lists for creating tasks, storing documents, and recording decisions."    string
[7]        "MPS#3 : A site to plan social occasions. It provides lists for tracking attendees, providing directions, and storing pictures of the event."    string
[8]        "MPS#4 : A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda and meeting attendees in addition to two blank pages for you to customize based on your requirements."    string
[9]        "CENTRALADMIN#0 : A site for central administration. It provides Web pages and links for application and operations management."    string
[10]    "WIKI#0 : A site for a community to brainstorm and share ideas. It provides Web pages that can be quickly edited to record information and then linked together through keywords"    string
[11]    "BLOG#0 : A site for a person or team to post ideas, observations, and expertise that site visitors can comment on."    string
[12]    "SGS#0 : This template provides a groupware solution that enables teams to create, organize, and share information quickly and easily. It includes Group Calendar, Circulation, Phone-Call Memo, the Document Library and the other basic lists."    string
[13]    "TENANTADMIN#0 : A site for tenant administration. It provides Web pages and links for self-serve administration."    string
[14]    "ACCSRV#0 : Microsoft Access Server"    string
[15]    "ACCSRV#1 : Create an assets database to keep track of assets, including asset details and owners."    string
[16]    "ACCSRV#3 : Create a database to track information about fundraising campaigns including donations made by contributors, campaign related events, and pending tasks."    string
[17]    "ACCSRV#4 : Create a contacts database to manage information about people that your team works with, such as customers and partners."    string
[18]    "ACCSRV#6 : Create an issues database to manage a set of issues or problems. You can assign, prioritize, and follow the progress of issues from start to finish."    string
[19]    "ACCSRV#5 : Create a project tracking database to track multiple projects, and assign tasks to different people."    string
[20]    "BDR#0 : A site to centrally manage documents in your enterprise."    string
[21]    "OFFILE#0 : (obsolete) This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository."    string
[22]    "OFFILE#1 : This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository."    string
[23]    "OSRV#0 : This template creates a site for administering shared services"    string
[24]    "PPSMASite#0 : A site for presenting PerformancePoint dashboards and scorecards. The site also includes links to PerformancePoint Dashboard Designer and storage for dashboard content such as analytic charts, reports, KPIs, and strategy maps."    string
[25]    "BICenterSite#0 : A site for presenting Business Intelligence Center."    string
[26]    "SPS#0 : This template is obsolete."    string
[27]    "SPSPERS#0 : This web template defines a Personal Space for an individual participating on a SharePoint Portal."    string
[28]    "SPSMSITE#0 : A site for delivering personalized views, data, and navigation from this site collection into My Site. It includes personalization specific Web Parts and navigation that is optimized for My Site sites."    string
[29]    "SPSTOC#0 : This template is obsolete."    string
[30]    "SPSTOPIC#0 : This template is obsolete."    string
[31]    "SPSNEWS#0 : This template is obsolete."    string
[32]    "CMSPUBLISHING#0 : A blank site for expanding your Web site and quickly publishing Web pages. Contributors can work on draft versions of pages and publish them to make them visible to readers. The site includes  document and image libraries for storing Web publishing assets."    string
[33]    "BLANKINTERNET#0 : This template creates a site for publishing Web pages on a schedule, with workflow features enabled.  By default, only Publishing subsites can be created under this site. A Document and Picture Library are included for storing Web publishing assets."    string
[34]    "BLANKINTERNET#1 : This template creates the Press Releases subsite for an Internet-facing corporate presence website."    string
[35]    "BLANKINTERNET#2 : A site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site."    string
[36]    "SPSNHOME#0 : A site for publishing news articles and links to news articles. It includes a sample news page and an archive for storing older news items."    string
[37]    "SPSSITES#0 : A site for listing and categorizing important sites in your organization. It includes different views for categorized sites, top sites, and a site map."    string
[38]    "SPSCOMMU#0 : This template is obsolete."    string
[39]    "SPSREPORTCENTER#0 : A site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information."    string
[40]    "SPSPORTAL#0 : A starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as  readers and is used to host team sites."    string
[41]    "SRCHCEN#0 : A site for delivering the search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types."    string
[42]    "PROFILES#0 : This template creates a profile site that includes page layout with zones"    string
[43]    "BLANKINTERNETCONTAINER#0 : A starter site hierarchy for an Internet-facing site or a large intranet portal. This site can be customized easily with distinctive branding. It includes a home page, a sample press releases subsite, a Search Center, and a login page. Typically, this site has many more readers than contributors, and it is used to publish Web pages with approval workflows."    string
[44]    "SPSMSITEHOST#0 : A site used for hosting personal sites (My Sites) and the public People Profile page. This template needs to be provisioned only once per User Profile Service Application, please consult the documentation for details."    string
[45]    "ENTERWIKI#0 : A site for publishing knowledge that you capture and want to share across the enterprise. It provides an easy content editing experience in a single location for co-authoring content, discussions, and project management."    string
[46]    "SRCHCENTERLITE#0 : A site for delivering the search experience. The site includes pages for search results and advanced searches."    string
[47]    "SRCHCENTERLITE#1 : The Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation."    string
[48]    "SRCHCENTERFAST#0 : A site for delivering the FAST search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types."    string
[49]    "visprus#0 : A site for teams to quickly view, share, and store Visio process diagrams. It provides a versioned document library for storing process diagrams, and lists for managing announcements, tasks, and review discussions."    string

 

 

  • qwetader

    This is great information. Thanks for sharing.