10

It seems I've been incorrectly using WebTemplateId where I should be using the Configuration property. //web is an SPWeb instance var templateName = web.WebTemplate + "#" + web.Configuration; Using this code gives me the correct templateName I can use to create new webs.


8

Web Template: Web template refers to new feature element available in SharePoint 2010, which provides us flexible way to define definition (onet.xml file), which will be used only on provisioning time, when the site is created. There are no references to the definition on runtime, which provide easy maintainability for the definition. Source ...


5

The accepted answer is not correct. You can create multiple root sites in one web application. Additionally, each root site does not have to have a url of www.domain.com/path/site1. Using Host Named Site Collections, each root site can have it's own sub domain name. If your company name is contoso, and you create a web application at webapp.contoso.com, You ...


5

If your final goal is migration to SharePoint Online (SPOL) you definately need to think this into your branding approach. WebTemplates were our choice for SharePoint 2010 on-premises solutions, since they have a much better upgrade story than custom site definitions. We have also long ago dropped the declarative approach for other artifacts and for ...


5

Go to your Web Template File inside …/TEMPLATE/LCID/XML There is an attribute SubWebOnly in the Configuration element of the template. Set that attribute to TRUE and the template should show only when creating subsites. <Template Name=" " ID=""> <Configuration ID="" Title="" ... ... ...


5

Your webtemplate is probably not globally deployed [..]the documentation for Get-SPWebTemplate which states “Displays all globally installed site templates that match the given identity.” A sandboxed solution is not globally deployed, which explains why the template couldn’t be found. Source Try this: $web = get-spweb http://intranet $template = $...


4

Why dont you just add the feature to SiteFeatures or WebFeatures element of onet.xml ? It is what it is there for :) The features are executed synchronous, so only in very rare occasions have I experienced race conditions.


4

This happens because your DCWebTemplate is a module. You can't use a module to deploy to farm. If you check your spi-file you can see the attribute SupportedDeploymentScopes is only web and site. <ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft....


4

When you create a site using a Web Template there is no dependency from that site to the Web Template that created it, that's one of the major differences between Site Templates and Web Templates. BUT the Web Template may use custom features which then create a dependency between the Site and the solution(s) containing these features. These dependencies may ...


4

SPWeb.WebTemplate property Gets the name of the site definition or site template that was used to create the site. using System; using Microsoft.SharePoint; namespace Test { class ConsoleApp { static void Main(string[] args) { using (SPSite site = new SPSite("http://localhost")) { using (SPWeb web = site....


3

WebTemplate isn't allowed in Farm scoped features. See Elements by Scope even though it's for SP2010 it can be used as a guideline for SP2013. The best you can do is WebApplications scope


3

You cannot provision Web Parts in Modules element using a Web Template. Consider adding a feature receiver or a Module SPI.


3

I had a similar problem. After I created my Web Application I received a strange error, But my Web Application was created, so I continued creating a Site Collection on it but received "403 forbidden" in the end. These instructions helped me: http://support.microsoft.com/kb/2543306 After I raised the timeout parameters in the IIS I recreated the WebApp ...


3

Yes, You can have three different site collections based on three different templates. It doesn't matter if they are based on custom templates or not. In a web application you can create 750,000 (500,000 Personal Sites and 250,000 other sites per farm) The maximum recommended number of site collections per farm is 500,000 Personal Sites plus 250,...


3

What you could do, is to use for example jQuery. There are elements lower down in the structure that has unique (well unique for all List View Webparts) classes. Ex. $('.ms-listviewtable').closest('.ms-webpart-chrome').addClass('tada-listview-webpart') That code adds the class tada-listview-webpart to the most outer element of a List View Webpart. By ...


3

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server"> <label class="ms-hidden"><SharePoint:ProjectProperty Property="Title" runat="server"/></label> </asp:Content> This is a snippet from default.aspx in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\...


3

Found the issue. Because the property in my web template "ContainsDefaultLists" was set on TRUE and it should be FALSE


3

Site Represents a collection of sites in a Web application, including a top-level website and all its subsites. Web Represents a SharePoint website. Site Template Contains a customized site design based on an existing site definition. Site templates in this context exist outside of any site definition. Real World Example The marketing team ...


3

In you custom ONET.XML you need to provision default.aspx as well. <Module Name="Home" Url="$Resources:osrvcore,List_Pages_UrlName;" Path=""> <File Url="default.aspx" Type="GhostableInLibrary" > <Property Name="Title" Value="$Resources:cmscore,IPPT_HomeWelcomePage_Title;" /> <Property Name="...


3

That's correct, the STS#1, or Blank site template, is not available in SharePoint Online, but that's not what you want anyway. You can't apply a template to a site that already has a template. What you want to do is use the "select template later" option. In the UI, click the "Custom" tab and "Select Template Later". Then once the site is created you can ...


2

The onet.xml file is divided into two parts, first is the "SiteFeatures" and the second called "WebFeatures". The "SiteFeatures" Section that holds the site features starts activating all the features only when creating a site collection. The "WebFeatures" Section that holds the web features starts activating all the web scoped features only when creating a ...


2

yes, You can have a site definition with more then 1 configuration, and you can use one of them to create a site, for example, when we try to create a site we give web template name its configuration ID, Let say you got a site definition with two configuration, 1 and 0, STS#0 Team Site STS#1 Blank Site You can create a Team site by using ...


2

You will need to add MasterUrl attribute to your configuration node and also need to add module element for master page, Your configuration will look like this, <Configuration ID=”0” Name=”Default” MasterUrl=”_catalogs/masterpage/project.master“> and module node will be something like this, <Module Name=”MasterPage” List=”116” Url=”_catalogs/...


2

In one web application, can we create multiple root site collections ? No, only one 'root' can exist, if you mean at the root of the URL i.e. http://domain.com/. You can create many more at http://domain.com/path/site1, http://domain.com/path/site2, etc. I just wanted to clarify the use of the word 'root'


2

You are using the rootweb of the site, not the current web, so any changing you are making is always to the rootweb. Instead of using webTemp to get rootweb, just use webTemp as the web. private const string QuicklaunchHeader = "Saksmappe"; public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPWeb web = properties.Feature....


2

I think that you should not to add web part to the page directly, instead of it you should use web part provision. You can start your research from this posts: Provisioning Custom WebPart in SharePoint 2010 tricks Provision a WebPart using a SharePoint Feature Provision publishing page with webpart in sandboxed solution


2

The error says that you are missing the template 10099 with LCID 1033. So you might have the templates installed, but SharePoint can't find the template that you have installed that has LCID 1033 (English US). Maybe you need to update the XML to be set to LCID 1033.


2

I solved the problem so I am leaving here the solution that worked for me. In the onet.xml file there is line <NavBars></NavBars> I have replaced it with the following one <NavBars> <NavBar Name="SharePoint Top Navbar" ID="1002"></NavBar> </NavBars> Now its working.


2

I've looked into this same requirement. We went down the road of creating a site collection and selecting it later. The PowerShell options, http://technet.microsoft.com/en-us/library/fp161370.aspx, for creating a site collection should provide the same. I don't see an option to upload a template and create the site at the same time. HTH


2

You can't deploy site templates (onet.xml files) to the Office 365, so you are stuck with the templates that they offer you for site-collection creation. Webs on the other hand you can create your own web templates and use. One interesting concept that might help you out are remote site provisioning, where an external provisioning provider is responsible ...


Only top voted, non community-wiki answers of a minimum length are eligible