Поделиться через


WebParts Element

The WebParts element contains a collection of Web Parts in a list definition or a list template.

Syntax

<WebParts>
</WebParts>

Element Relationships

Parent Elements Child Elements
Form AllUsersWebPart, View, WebPart

Example

The following example from the SCHEMA.XML file for issues lists uses the WebParts element to contain two Web Parts within a form.

<WebParts>
   <View BaseViewID="6" WebPartZoneID="Bottom" WebPartOrder="2">
      <![CDATA[
            <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
                <Assembly>Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
                            <Title></Title>
                            <Description></Description>
                            <FrameType>None</FrameType>
                            <ConnectionID>00000000-0000-0000-0000-000000000002</ConnectionID>
                          </WebPart> ]]>
   </View>
   <View BaseViewID="5" WebPartZoneID="Bottom" WebPartOrder="3">
      <![CDATA[
            <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
            <Assembly>Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
            <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
            <Title></Title>
            <Description></Description>
            <FrameType>None</FrameType>
            <ConnectionID>00000000-0000-0000-0000-000000000003</ConnectionID>
         </WebPart> ]]>
   </View>
</WebParts>