Compartir a través de


Content Type Access Control

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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 method 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 method 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 Based on Other Content Types

Content Type Change Control

Updating Child Content Types

SPContentType Object Overview