Modules Element
The Modules element contains a collection of modules in a configuration of a site definition within ONET.XML.
Syntax
<Modules>
</Modules>
Element Relationships
Parent Elements | Child Elements |
---|---|
Configuration, Project | Module |
Example
The following example from ONET.XML uses the Modules element to specify which modules to include within a configuration.
<Configuration ID="0" Name="Default">
<Lists>
<List Title="Shared Documents" Url="Shared Documents" QuickLaunchUrl="Shared Documents/Forms/AllItems.aspx" Type="101" />
<List Title="General Discussion" Url="Lists/General Discussion" QuickLaunchUrl="Lists/General Discussion/AllItems.aspx" Type="108" />
<List Title="Announcements" Type="104" Url="Lists/Announcements" />
<List Title="Links" Type="103" Url="Lists/Links" />
<List Title="Contacts" Url="Lists/Contacts" QuickLaunchUrl="Lists/Contacts/AllItems.aspx" Type="105" />
<List Title="Events" Type="106" Url="Lists/Events" />
<List Title="Tasks" Url="Lists/Tasks" QuickLaunchUrl="Lists/Tasks/AllItems.aspx" Type="107" />
<List Title="Site Template Catalog" Type="111" Url="_catalogs/wt" RootWebOnly="TRUE" />
<List Title="Web Part Catalog" Type="113" Url="_catalogs/wp" RootWebOnly="TRUE" />
<List Title="List Template Catalog" Type="114" Url="_catalogs/lt" RootWebOnly="TRUE" />
</Lists>
<Modules>
<Module Name="Default" />
<Module Name="WebPartPopulation" />
</Modules>
</Configuration>
A second Modules element within the same ONET.XML file defines the contents of each file within each module.
<Modules>
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" NavBarHome="True">
<View List="104" BaseViewID="0" WebPartZoneID="Left"/>
<View List="106" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="2"/>
<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
.
.
.
</AllUsersWebPart>
<View List="103" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="2"/>
<NavBarPage Name="Home" ID="1002" Position="Start"></NavBarPage>
<NavBarPage Name="Home" ID="0" Position="Start"></NavBarPage>
</File>
</Module>
<Module Name="DefaultBlank" Url="" Path="">
<File Url="default.aspx" NavBarHome="True" Type="Ghostable">
<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
.
.
.
</AllUsersWebPart>
<NavBarPage Name="Home" ID="1002" Position="Start"></NavBarPage>
<NavBarPage Name="Home" ID="0" Position="Start"></NavBarPage>
</File>
</Module>
<Module Name="WebPartPopulation" List="113" Url="_catalogs/wp" Path="lists\wplib\dwp" RootWebOnly="TRUE">
<File Url="MSContentEditor.dwp" Type="GhostableInLibrary"/>
<File Url="MSPageViewer.dwp" Type="GhostableInLibrary"/>
<File Url="MSImage.dwp" Type="GhostableInLibrary"/>
<File Url="MSMembers.dwp" Type="GhostableInLibrary"/>
<File Url="MSSimpleForm.dwp" Type="GhostableInLibrary"/>
<File Url="MSXml.dwp" Type="GhostableInLibrary"/>
</Module>
<Module Name="DWS" Url="" Path="dws">
<File Url="default.aspx">
<View List="104" BaseViewID="3" WebPartZoneID="Top"/>
<View List="103" BaseViewID="3" WebPartZoneID="Right" WebPartOrder="2"/>
<View List="101" BaseViewID="6" WebPartZoneID="Left"/>
<View List="107" BaseViewID="7" WebPartZoneID="Left" WebPartOrder="2"/>
<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
.
.
.
</AllUsersWebPart>
<NavBarPage Name="Home" ID="1002" Position="Start"></NavBarPage>
<NavBarPage Name="Home" ID="0" Position="Start"></NavBarPage>
</File>
</Module>
</Modules>