Once the page is copied, then we need to let SharePoint know
about the presence of the page while creating sub areas. The article also explains
what the Onet.xml file is used for. In order to make SharePoint aware of the
presence of the new Page, we need to make some changes on the Onet.xml file.
Locate the following code under Onet.xml.
Listing 1
<Modules>
<Module Name="Default" />
<Module Name="WebPartPopulation" />
</Modules>
Add an entry to the Modules section. For this example I
will call it AmeetArticle.
Listing 2
<Modules>
<Module Name="Default" />
<Module Name="WebPartPopulation" />
<Module Name=" AmeetArticle" />
</Modules>
Now, we also need to reference the pages. Locate the
following code.
Listing 3
<Modules>
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" Type="Ghostable"> </File>
</Module>
<Module Name="WebPartPopulation" List="113" Url="_catalogs/wp" Path="lists\wplib\dwp" RootWebOnly="TRUE">
<File Url="MSContentEditor.dwp" Type="GhostableInLibrary" />
<File Url="MSImage.dwp" Type="GhostableInLibrary" />
<File Url="MSPageViewer.dwp" Type="GhostableInLibrary" />
</Module>
</Modules>
In the above section we need to create another module
section which references AmeetArticle name declared earlier.
Listing 4
<Modules>
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" Type="Ghostable"> </File>
</Module>
<Module Name="WebPartPopulation" List="113" Url="_catalogs/wp" Path="lists\wplib\dwp" RootWebOnly="TRUE">
<File Url="MSContentEditor.dwp" Type="GhostableInLibrary" />
<File Url="MSImage.dwp" Type="GhostableInLibrary" />
<File Url="MSPageViewer.dwp" Type="GhostableInLibrary" />
</Module>
<Module Name="AmeetArticle" URL="" Path="">
<File Url="AmeetArticle.aspx" />
</Module>
</Modules>
If the user has created multiple ASP.NET pages and has created
a folder, then the folder path can be provided to the Path attribute under
Module. Once the Path is provided, individual files can be referenced as shown
for the AmeetArticle.ASPX page. With this we can even store the created pages
in different templates and reference it through the Onet.xml file.