Udostępnij za pośrednictwem


Content Type Access Control

Applies to: SharePoint Foundation 2010

Available in SharePoint Online

There are two approaches you can use to control who can access the content types you create, each with its own advantages.

Hidden Content Types

You can specify that a content type be hidden. Hidden content types are not displayed on the New menu for list views. Therefore, users cannot create new items of that content type from the list. The content type is still displayed everywhere else in the user interface.

Use the Hidden property of the SPContentType class to get and set whether a content type is hidden.

Content Types in the _Hidden Group

You can also add your content type to the predefined "_Hidden" content type group. Content types belonging to the "_Hidden" group are not displayed in the user interface on the list of available content types for lists.

Using the object model, you can access a content type belonging to the "_Hidden" group as you would any other content type.

Note

The content type group name "_Hidden" is case-sensitive.

Use the Group property of the SPContentType class to get and set the content type group to which a content type belongs.

See Also

Concepts

Introduction to Content Types

Creating Content Types

Content Type Change Control

Updating Child Content Types

Other Resources

SPContentType Object Overview