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 ...
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 ...
Ok scratch that answer. I obviously didnt read your question well enough before answering :(
What I would do to debug is to import the package into Visual Studio 2010 (import WSP SharePoint 2010 Project type). Then I would track down feature ID's that are missing and try to get some info on them by googling the GUID.
If need be, comment these features out ...
Investigation shows that the features that have been activated when a template is saved are not re-activated when the template is used to provision a site.
I also suspect that the 'Save Site as template' process detects that the master page being used is outsite the site itself, and resets to using the V4.master. If I put a copy of my master page within the ...
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.
I solved the problem so I am leaving here the solution that worked for me. In the onet.xml file there is line
I have replaced it with the following one
<NavBar Name="SharePoint Top Navbar" ID="1002"></NavBar>
Now its working.
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....
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