Provisioning Web Parts in Templates - ListViewsWebPart Basic structure


/ Published in: XML
Save to your folder(s)

I also included how to provision a Calendar list web part in Calendar View


Copy this code and paste it in your HTML
  1. <View List="Lists/listPath"
  2. BaseViewID="0"
  3. RecurrenceRowset="TRUE"
  4. WebPartZoneID="Center"
  5. WebPartOrder="2">
  6. <![CDATA[
  7. <webParts>
  8. <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
  9. <metaData>
  10. <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
  11. <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
  12. </metaData>
  13. <data>
  14. <properties>
  15. <property name="Title">List Title</property>
  16. <property name="AllowConnect" type="bool">True</property>
  17. <property name="AllowClose" type="bool">False</property>
  18. </properties>
  19. </data>
  20. </webPart>
  21. </webParts>
  22. ]]>
  23. </View>
  24.  
  25. <!-- Calendar needs the TYPE property for Calendar View -->
  26. <View List="Lists/Calendar"
  27. BaseViewID="2"
  28. Type="CALENDAR"
  29. Scope="Recursive"
  30. RecurrenceRowset="TRUE"
  31. WebPartZoneID="Center"
  32. WebPartOrder="3">
  33.  
  34. </View>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.