I am still working on creating a suite of custom web templates for my company. I would like to keep the "Wiki Home Page Feature" because it creates the "Site Assets" and "Site Pages" folders, but I do not want the wiki home page.
I am using the following event receiver
public override void FeatureActivated(SPFeatureReceiverProperties properties) { using (SPSite oSiteCollection = SPContext.Current.Site) { SPWeb oWebSite = oSiteCollection.OpenWeb(); SPFolder oFolder = oWebSite.RootFolder; oFolder.WelcomePage = "Home/Home.aspx"; oFolder.Update(); oWebSite.Dispose(); } }
and this is my module
<Module Name="Home" Url="SitePages"><File Path="Home\Home.aspx" Url="Home.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" ></File></Module>
When I create a site based on this template I get the following error 'Failed to instantiate file "Home.aspx" from module "Home": The specified list does not exist.'
What am I doing wrong here?
- Daniel