WebPart Element (DeploymentManifest)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Represents an instance of a SharePoint Foundation top-level web part object (SPWebPart).

Definition

DECLARATION
<xs:element name="WebPart"
        type="SPWebPart"
        minOccurs="1" maxOccurs="unbounded"
/>
USAGE
<SPWebPart>
      <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="25">
                  <xs:element name="Script" />
                  <xs:element name="PagedRowset" />
                  <xs:element name="PagedClientCallbackRowset"
                  <xs:element name="PagedRecurrenceRowset" />
                  <xs:element name="ViewFields" type="SPFieldLinkCollection" />
                  <xs:element name="ViewData" />
                  <xs:element name="Query" />
                  <xs:element name="RowLimit" />
                  <xs:element name="RowLimitExceeded" />
                  <xs:element name="Toolbar" />
                  <xs:element name="Formats" />
                  <xs:element name="Aggregations" />
                  <xs:element name="ViewStyle"
                  <xs:element name="ViewBody" />
                  <xs:element name="ViewEmpty" />
                  <xs:element name="ViewFooter" />
                  <xs:element name="ViewHeader" />
                  <xs:element name="ViewBidiHeader"/>
                  <xs:element name="GroupByFooter"
                  <xs:element name="GroupByHeader" />
                  <xs:element name="CalendarViewStyles" />
                  <xs:element name="ListFormBody" />
            </xs:choice>
      </xs:sequence>
      <xs:attribute name="Name" />
      <xs:attribute name="ListId />
      <xs:attribute name="ListRootFolderUrl" />
      <xs:attribute name="Type" />
      <xs:attribute name="UserId" />
      <xs:attribute name="DisplayName" />
      <xs:attribute name="WebPartTypeId" />
      <xs:attribute name="Version" />
      <xs:attribute name="BaseViewID" />
      <xs:attribute name="WebPartZoneID" />
      <xs:attribute name="IsIncluded" />
      <xs:attribute name="WebPartOrder" />
      <xs:attribute name="FrameState" />
      <xs:attribute name="Source" />
      <xs:attribute name="AllUsersProperties" />
      <xs:attribute name="PerUserProperties" />
      <xs:attribute name="ContentTypeId" />
            <!-- For files (major [default] or minor) -->
      <xs:attribute name="Level" />
            <!-- Flags -->
      <xs:attribute name="Flags" />
      <xs:attribute name="Scope" />
      <xs:attribute name="Hidden" />
      <xs:attribute name="Threaded" />
      <xs:attribute name="ReadOnly" />
      <xs:attribute name="RecurrenceRowset" />
      <xs:attribute name="FPModified" />
      <xs:attribute name="ModerationType" />
      <xs:attribute name="Personal" />
      <xs:attribute name="OrderedView" />
</WebPart>

Type

WebPart

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Type Description
AllUsersProperties
xs:string
This value is generated by the web part and should not be changed.
BaseViewID
xs:string
Optional.
ContentTypeId
xs:string
Specifies the content type by identifier.
DisplayName
xs:string
A representation of the web part name as it is displayed in the title bar of the web part.
Flags
xs:string
Optional flag.
FPModified
xs:boolean
Optional flag.
FrameState
xs:string
Optional. Specifies the initial state of the web part frame; the frame can be normal (expanded) or minimized.
Hidden
xs:boolean
Optional flag. Specifies whether the web part control is displayed on a webpage.The value is true if the control is hidden; the default is false.
IsIncluded
xs:string
Optional.
Level
xs:string
Optional. Indicates whether the specified file is of the "major" or "minor" level. The default value is "major".
ListId
Guid Simple Type (DeploymentManifest)
Optional. Unique identifier of the web part list.
ListRootFolderUrl
xs:string
Optional. The URL to the root folder that contains the list.
ModerationType
xs:string
Optional flag.
Name
Guid Simple Type (DeploymentManifest)
Required. Unique identifier of the web part.
OrderedView
xs:boolean
Optional flag.
Personal
xs:boolean
Optional flag.
PerUserProperties
xs:string
This value is generated by the web parts on a per-user basis and should not be changed.
ReadOnly
xs:boolean
Optional flag. Specifies whether contents of the web part are read only; true if read only, otherwise false.
RecurrenceRowset
xs:boolean
Optional flag.
Scope
xs:string
Optional flag.
Source
xs:string
Optional.
Threaded
xs:boolean
Optional flag.
Type
xs:string
Optional. Specifies the type of the web part.
UserId
Guid Simple Type (DeploymentManifest)
Optional.
Version
xs:string
Optional. Specifies the version of the web part.
WebPartOrder
xs:string
Optional. Specifies the ordering of contents in the web part.
WebPartTypeId
xs:string
Optional. Specifies the identifier of the web part type.
WebPartZoneID
xs:string
Optional. Specifies the identifier of the web part zone.

Child elements

Parent elements

Remarks

Web Parts can derive from either of two base classes - an ASP.NET web part (WebPart), or a SharePoint Foundation web part (WebPart).

See also