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.
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.
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.
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 ...
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 ...
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 ...
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="">
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
$web = get-spweb http://intranet
$template = $...
Have you had a chance to look over the following link?
"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 ...
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.
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....
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 ...
Gets the name of the site definition or site template that was used to create the site.
static void Main(string args)
using (SPSite site = new SPSite("http://localhost"))
using (SPWeb web = site....
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 ...
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:
After I raised the timeout parameters in the IIS I recreated the WebApp ...
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.,
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,...
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.
That code adds the class tada-listview-webpart to the most outer element of a List View Webpart.
Represents a collection of sites in a Web application, including a top-level website and all its subsites.
Represents a SharePoint website.
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 ...
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;" />
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 ...
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.
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).
ImageUrl="/_layouts/images/example.PNG" /> <!-- Works -->
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.
When creating a site from template: Error a duplicate field name "From" was found.
Save template.wsp to desktop from solution gallery
Rename it to template.cab and extract the files ...