Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Specifies a content type to provision on a list defined in the onet.xml schema.
<ContentTypeBinding
ContentTypeId="Text"
ListUrl="Text"
RootWebOnly="TRUE" | "FALSE"
/>
The following sections describe attributes, child elements, and parent elements.
Attribute |
Description |
---|---|
**ContentTypeId** |
Required **Text**. A string that represents the content type ID of the site content type to add to the specified list. |
**ListUrl** |
Required **Text**. A string that represents the Web-relative path to the list to which to add the content type. |
**RootWebOnly** |
Optional **Boolean**. **TRUE** to associate this binding only on the root website in a site collection. |
None
Elements Element (ContentTypeBinding)
Lists defined in the onet.xml schema cannot be modified directly.
Following is an example of the ContentTypeBinding element specifying the content type to bind to the specified list.
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentTypeBinding ContentTypeId="0x010102" ListUrl="Shared Documents" />
<ContentTypeBinding ContentTypeId="0x010108" ListUrl="Shared Documents" />
</Elements>