Add list view webpart in site definition onet.xml
Here is how you add a List View Web Part in onet.xml of your site definition.
<Module Name="Reports" Url="" Path="">
<File Url="Report.aspx" NavBarHome="False">
<View List="12001" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="1">
<![CDATA[
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
<Assembly>Microsoft.SharePoint, Version=14.0.0.0, …</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart
</TypeName>
<Title>ListName</Title> -> Add the List Name
<FrameType>TitleBarOnly</FrameType>
</WebPart>
]]>
</View>
</File>
</Module>
<Module Name="Reports" Url="" Path="">
<File Url="Report.aspx" NavBarHome="False">
<View List="12001" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="1">
<![CDATA[
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
<Assembly>Microsoft.SharePoint, Version=14.0.0.0, …</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart
</TypeName>
<Title>ListName</Title> -> Add the List Name
<FrameType>TitleBarOnly</FrameType>
</WebPart>
]]>
</View>
</File>
</Module>
0 comments:
Post a Comment