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.


9

You can export the template however you must manually modify the exported WSP for it to import properly. Or as Microsoft says, it isn't supported, http://support.microsoft.com/kb/2492356.


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 ...


6

There is no good way to debug in SharePoint online. You basically have two options Remove/add pieces of declarative content one at a time to rule out any failing parts If you have code that do the provisioning, use a list to log all exceptions.


5

The "page layouts and site templates" page that is referred to in the post link you provided applies only to SharePoint "publishing" sites. These are sites that have the publishing features activated at the site collection and site level. If your site is not in fact a publishing site, or if you wish to hide templates from within central admin, the only way ...


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

Have you had a chance to look over the following link? http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx#sitetemplate "One of the consideration with the site templates is also the fact that unless you import them to Visual Studio and modify its settings, they are only available on site collection level (site collection ...


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

There are different approaches on creating SubSites in your Office 365 SharePoint Online environment. Using a EventReceiver (Which can be a FeatureReceiver). U still need to create a template for the specific subsite, then use the receiver to create the subsite from that template using this: http://msdn.microsoft.com/en-us/library/ms411806.aspx Be aware ...


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

As others have pointed out, it is not supported. How to handle this? - Web Templates is your answer - Build web templates, include the required SharePoint features and custom features - custom features can be used to build the site with default content which can be the default pages, default lists, assigning the default master page etc., etc.,


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

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


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

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

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="...


2

I experienced a similar issue. Upon creation of a new site, the features included in the <WebFeatures> node of the ONet.xml were not activated upon site creation. When navigating to '/_layouts/ManageFeatures.aspx' these features would appear to be activated but their code would not run (no files were placed from modules, breakpoints set in event ...


2

The WebProvisioned method of the SPWebEventReceiver does not fire when a site collection is created. This is confirmed by the WebProvisioned Method MSDN page. Depending of what your custom code does, it is best to use feature stapling either scoped to Site or Web against the site template you are using.


2

You should not. 1)Create a blank site , add your features , save as template. After provisioning activate Publishing feature 2) Create custom web provisioning code / feature staple


2

I've managed to solve my problem. Apparently the ImageUrl property of the template element only works with relative URLs (and I was trying to set it to an absolute URL). <WebTemplate (...) ImageUrl="/_layouts/images/example.PNG" /> <!-- Works -->


2

I had this problem too. Not sure what caused it, but we had weeks tied up in this template. Here's how I fixed it. Problem: When creating a site from template: Error a duplicate field name "From" was found. Solution: Save template.wsp to desktop from solution gallery _catalogs/solutions/Forms/AllItems.aspx Rename it to template.cab and extract the files ...


2

The best article as of now on this subject is Vesa Juvonens post here.


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