Content Type Scope

Applies to: SharePoint Foundation 2010

Available in SharePoint Online

The Microsoft SharePoint Foundation site in which you create a content type determines its scope—that is, the extent of its availability. A site content type becomes available to lists and document libraries within the site on which the content type is created, and also to lists and document libraries in any child site.

The following figure presents an example of the scope of content types that are created on a hypothetical site collection that is part of an installation of SharePoint Foundation. Site content types that are created at the root site of the collection, the Planning site, are available not only for its direct child sites—United States, Europe, and Asia—but also for all sites further down the site hierarchy, such as England, Japan, and the Press Releases list. Site content types that are created at the Europe site would be available for the England child site and the Press Releases list it contains, but not the Japan site, because it is a child of the Asia site, not the Europe site.

Site and list content type scope

You can obtain a list of the content types that are available to a site by using the SharePoint Foundation user interface. On the ribbon, click Site Actions, and then select Site Settings. On the Site Settings page, look for the Galleries section, and then click Site content types to go to a page that lists content types that are available to the site. Notice that the list includes a column for Source. This is the name of the site in the site collection hierarchy where a content type is defined.

You can use the object model to obtain similar information. For example, you can represent a SharePoint Foundation site by instantiating an SPWeb object in server code or a Web object in client code. Then you can access the AvailableContentTypes property of that object to get a collection of SPContentType objects that represent the content types that are available to the site. To determine where a particular content type was defined, read the value of the ParentWeb property of the SPContentType object. To get a server-relative URL for the highest level within the content type's scope, access the Scope property of the SPContentType object.

The scope of a content type not only determines its availability, but it also has implications for change control. Changes that you make to a content type can be propagated to all content types that are derived from it. For example, if you add a column to a content type that is defined on the root site of a site collection, the change can be pushed down to all content types that inherit from it throughout the site hierarchy. For more information, see Updating Content Types.

See Also

Concepts

Site and List Content Types

Creating Content Types

Content Type Change Control

Content Type Access Control