Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Site Definition (Onet.xml) Files

Site Definition (Onet.xml) Files

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In an Onet.xml file, the Feature element is used within a site definition configuration to contain a reference to a Feature instance and default property values. The Configuration element specifies lists and modules to use when creating SharePoint sites. For information about the format and elements used in site definitions, see Site Schema.

SharePoint Foundation activates Features specified within the Onet.xml file in the order that they are listed. Consequently, you must specify Features that are depended upon before Features that depend upon them.

The following example shows the Feature element used to specify Features and Feature properties in a site definition configuration.

<Configuration ID="0" Name="Publishing"> 
   <Lists>
      <List Title="Web Part Gallery" Type="113" Url="_catalogs/wp" 
         RootWebOnly="True" />
   </Lists>
   <SiteFeatures>
      <Feature ID="AEBC918D-B20F-4a11-A1DB-9ED84D79C87E"/>
   </SiteFeatures>
   <WebFeatures>
      <Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
         <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
            <Property Key="ChromeMasterUrl" Value=""/>
            <Property Key="WelcomePagePageLayoutUrl" Value=""/>
            <Property Key="WelcomePageUrl" Value=""/>
         </Properties>
      </Feature>
      <Feature ID="23BCB938-F4B5-42a4-8050-F8CB92EF4078">
         <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
            <Property Key="CopyLayouts" Value="true"/>
         </Properties>
      </Feature>
   </WebFeatures>    
   <Modules></Modules>
</Configuration>
Show:
© 2015 Microsoft