If you have seen my previous post on Site Def architecture, we have got Modules node:
<Modules> <Module Name="Default" Url="" >
<File Url="default.aspx" NavBarHome="True" Type="Ghostable"> </File>
</Module>
</Modules>
Now under File node we have <AllUsersWebPart> node available. This is the key to add any webpart instances. Below is the example:
<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="0">
<![CDATA[
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"
xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image%22> <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly> <TypeName>Microsoft.SharePoint.WebPartPages.ImageWebPart</TypeName> <FrameType>None</FrameType>
<Title>Home Page</Title> <iwp:ImageLink>/_layouts/images/CONTACT.PNG</iwp:ImageLink> </WebPart> ]]>
</AllUsersWebPart>
No comments:
Post a Comment