Set a web template’s welcome page URL declaratively without using the publishing feature


To set a custom welcome page in a web template using no-code and no-publishing, do the following

  1. Create a web-scoped feature, e.g. WebTemplatePropertyBagFeature
  2. Add your code to an element like the one below (I am keeping a webtemplate id value property, just to show how you can have multiple values set via one single property bag feature):
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <PropertyBag ParentType="Web"> <Property Name="Readify.Pwcs.Intranet.Collaboration.WebTemplateId" Type="string" Value="PWCSTeamSite" /> </PropertyBag> <PropertyBag Url="" ParentType="Folder" RootWebOnly="FALSE"> <Property Name="vti_welcomepage" Type="string" Value="SitePages/Home.aspx" /> </PropertyBag> </Elements>