Compartilhar via


Element Scope

Applies to: SharePoint Foundation 2010

You can activate a Feature for a single scope, including farm, Web application, site collection, and Web site. The Feature scope is determined by the setting of the Scope attribute in the Feature element.

While a Web site Feature is one that you scope at the individual Web site level, a site collection Feature contains items that apply to the site collection as a whole (for example, content types that are shared across the site collection), as well as items that can be activated per site. Elements that can have either site collection or site scope include list definitions (templates and instances), modules (file sets), and item content type behaviors (per-item custom menu options and per-item events).

Note

For Web site scoped Features, a user must have the ManageWeb permission on the Web site to perform Feature activation or deactivation and property update through the object model or through the user interface (UI). For site collection scoped Features, a user must have the ManageWeb permission on the root Web site of the site collection to perform Feature activation or deactivation and property update through the object model, but to navigate to the Site Collection Features page and to activate or deactivate Features through the UI, the user must be a site collection administrator.

You can activate or deactivate a Web application Feature, and it can contain, for example, the following types of elements:

  • Administrative Web application links or other links

  • Delegate control registrations

  • Feature/site template associations

  • Document transform registrations

You scope a farm Feature for an entire server farm. A farm Feature contains a number of elements that are critical for implementing applications and logic anywhere within a deployment.

Scope and Feature Globalization

You can implement two types of resources in Features for support files:

  • Local resources stored in a subdirectory within the Features folder in the \Template\Features directory.

  • Shared application Feature and site definition resources that are stored in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\Resources and are designed to be used across Features and site definitions.