Share via


ContentTypeBinding Element (ContentTypeBinding)

Applies to: SharePoint Foundation 2010

Specifies a content type to provision on a list defined in the onet.xml schema.

<ContentTypeBinding
    ContentTypeId="Text"
    ListUrl="Text" 
    RootWebOnly="TRUE" | "FALSE"
/>

Attributes

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 Web site in a site collection.

Child Elements

None

Parent Elements

Elements Element (ContentTypeBinding)

Remarks

Lists defined in the onet.xml schema cannot be modified directly.

Example

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="https://schemas.microsoft.com/sharepoint/">
    <ContentTypeBinding ContentTypeId="0x010102" ListUrl="Shared Documents" />
    <ContentTypeBinding ContentTypeId="0x010108" ListUrl="Shared Documents" />
</Elements>

See Also

Concepts

Content Type Bindings