Share via


HideCustomAction Element (Custom Action)

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.

Hides an existing action that is implemented by default within the framework of Windows SharePoint Services Features, or within another custom action.

<HideCustomAction
  GroupId = "Text"
  HideActionId = "Text"
  Id = "Text"
  Location = "Text">
</HideCustomAction>

Attributes

Attribute

Description

GroupId

Optional Text. Identifies an action group that contains the action, for example, "SiteAdministration".

HideActionId

Optional Text. Specifies the ID of the custom action to hide, for example, "DeleteWeb". See Default Custom Action Locations and IDs for a list of the default custom action IDs that are used in Windows SharePoint Services. For more information about hiding custom action IDs, see the Remarks section, below.

Id

Optional Text.Specifies the ID of this hide custom action element, for example, "HideDeleteWeb".

Location

Optional Text. Specifies the location of the custom action to hide, for example, "Microsoft.SharePoint.SiteSettings". See Default Custom Action Locations and IDs for a list of the default custom action locations that are used in Windows SharePoint Services.

Child Elements

None

Parent Elements

Elements

Remarks

Note that HideCustomAction IDs are not limited to specific default Windows SharePoint Services custom actions. You can also hide custom actions that you create yourself when you write your own features. This means that for any CustomAction ID available in SharePoint 2007, you can have a corresponding HideCustomAction ID.

To locate custom action IDs, search in Windows File Explorer for the term “CustomAction.” By default, these are located in the folder %CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES. Here you will locate all of the features that contain specific CustomActions that are related to your specified feature. Depending upon your requirement, you may inspect the desired feature folder and check the underlying XML file to note the CustomAction IDs, GroupIDs and Locations for that feature. Furthermore, you can use the same information to write your HideCustomAction elements as required. Additionally, you can refer to the information listed in the WSS 3.0 SDK on the page titled How to: Add Actions to the User Interface.

Different actions may require using different CustomAction attributes to identify the menu where the custom menu item is placed. You may also need to specify other parameters for the action, for example, a version, user permissions required to perform the action, or placement in relation to existing actions in the menu. Similarly different HideCustomAction attributes may require different HideActionIds based upon which CustomAction you are trying to hide.

Example

For an example of how this element is used, see Custom Action Definitions.

Microsoft.Win32.RegistryKey#4

See Also

Concepts

Default Custom Action Locations and IDs