I have created a web template(inheriting from STS template) which includes few document libraries and lists. Document libraries are created using list definition while lists are OOTB lists included directly in the onet.xml file. Whenever a site is created using the above template, the default empty home page is coming as SitePages/Home.aspx

Now i have a requirement to add a page within the "SitePages" or "Pages" library which consist of few existing webparts. I had tried creating a custom page layout using the module file but failed. Now I am trying to add a custom webpart page to "SitePages" library with some webparts within it. I am able to add empty webpart page using module but unable to add any webparts within it using the "AllUsersWebPart" tag.

<Module Name="PublishingPageModule" Url="SitePages" Path="PublishingPageModule">
    <File Url="Main.aspx"
         Type="GhostableInLibrary" >
      <AllUsersWebPart WebPartOrder="0" WebPartZoneID="Left">
            <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                <type name="{$ListId:Lists/Announcement;}" />
                  <property name="Title" type="string">Sample WebPart - using AlluserWebPart element</property>
                  <property name="Description" type="string">Sample WebPart desctiption here.</property>

Here is my Module element, Can anyone suggest me something lets say I am adding a OOTB Announcement list.

If possible some tips on adding page layouts also

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.