I have a custom Web Template which enables the default features of a Publishing Site and in addition it enables custom Features e.g. WelcomePageProvisioning. It's kinda straight forward, but still I get an error: "A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title."
Web Template Elements.xml:
<WebTemplate
Name="WTStackExchangePublishing"
BaseTemplateName="CMSPUBLISHING"
BaseTemplateID="39"
BaseConfigurationID="0"
Title="StackExchange Publishing site"
Description="StackExchange Publishing site template"
DisplayCategory="StackExchange" />
StackExchange Web Template onet.xml:
<Project Revision="3" Title="$Resources:cmscore,IPPT_Project_Title;" ListDir="Lists" xmlns:ows="Microsoft SharePoint" UIVersion="4">
<NavBars>
<NavBar Name="SharePoint Top Navbar" ID="1002"></NavBar>
</NavBars>
<ListTemplates>
</ListTemplates>
<Configurations>
<Configuration ID="0" Name="BLANKINTERNET">
<SiteFeatures>
<!-- Activating SharePoint Server Publishing Infrastructure-->
<Feature ID="F6924D36-2FA8-4f0b-B16D-06B7250180FA"></Feature>
</SiteFeatures>
<WebFeatures>
<!-- Include the common WSSListTemplateFeatures used by CMS -->
<Feature ID="00BFEA71-DE22-43B2-A848-C05709900100" > </Feature>
<Feature ID="00BFEA71-E717-4E80-AA17-D0C71B360101" > </Feature>
<Feature ID="00BFEA71-52D4-45B3-B544-B1C71B620109" > </Feature>
<Feature ID="00BFEA71-A83E-497E-9BA0-7A5C597D0107" > </Feature>
<Feature ID="00BFEA71-4EA5-48D4-A4AD-305CF7030140" > </Feature>
<Feature ID="00BFEA71-F600-43F6-A895-40C0DE7B0117" > </Feature>
<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
<!-- Publishing -->
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="WelcomePageUrl" Value="$Resources:osrvcore,List_Pages_UrlName;/default.aspx"/>
<Property Key="PagesListUrl" Value=""/>
<Property Key="AvailableWebTemplates" Value="*-{e7416bda-dbf1-4e53-bb1c-2215f645abc5}#WTStackExchangePublishing;"/>
<Property Key="AvailablePageLayouts" Value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx"/>
<Property Key="DefaultPageLayout" Value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx" />
<Property Key="AlternateCssUrl" Value="" />
<Property Key="SimplePublishing" Value="false" />
</Properties>
</Feature>
<Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA">
<!-- Per-Web Portal Navigation Properties-->
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="InheritGlobalNavigation" Value="true"/>
<Property Key="IncludeSubSites" Value="true"/>
<Property Key="IncludePages" Value="true"/>
</Properties>
</Feature>
<!-- Office SharePoint Server Publishing -->
<Feature ID="94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB"></Feature>
<!-- StackExchange Welcome Page Provisioning -->
<Feature ID="5c3e91cd-1157-4101-a108-1d1e4318f02e" />
</WebFeatures>
</Configuration>
</Configurations>
</Project>
StackExchange Welcome Page Elements.xml
<Module Name="DefaultHome" Url="$Resources:osrvcore,List_Pages_UrlName;">
<File Url="default.aspx" Type="GhostableInLibrary" Level="Draft" Path="WPStackExchangePublishing\default.aspx">
<Property Name="Title" Value="Welcome" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx, Blank Web Part Page" />
<Property Name="ContentType" Value="Welcome Page" />
</File>
</Module>
StackExchange Welcome Page default.aspx
<%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %>
I'm stuck at the moment. A thing to mention is that I'm using a sandbox solution. Any suggestions on how I would be able to get this working? Any help is greatly appreciated!