Custom Action Definition Schema

XML Schema Definition

An XML document that defines custom actions must validate with the schema defined in the file wss.xsd. This file is located on the following path: %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML.

Elements

Elements

CustomActionGroup

CustomAction

HideCustomAction

The CustomActionGroup element contains the core definition for a grouping of custom actions.

The UrlAction element must be used to specify the URL for a custom action. If no action is specified (an error condition), the link is displayed but it is not linked to anything.

Use the HideCustomAction element to hide an existing action that is implemented by default within the infrastructure of Microsoft SharePoint Foundation Features, or within another custom action. For a list of the default custom action IDs, see Default Custom Action Locations and IDs.

Example

  • The following example shows an XML file whose contents replace default actions in a SharePoint Foundation page with new actions. For a programming task that shows the steps for defining and registering custom actions, see How to: Modify the User Interface Using Custom Actions.

Interested in mastering  SharePoint ? Learn more about SharePoint Tutorial in this blog post.

XML

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<CustomActionGroup

Id="PortalAnalytics"

Location="Microsoft.SharePoint.Administration.ApplicationManagement"

Title="Usage Reporting"

Sequence="50" />

<CustomAction

Id="ManageAnalytics"

GroupId="PortalAnalytics"

Location="Microsoft.SharePoint.Administration.ApplicationManagement"

Sequence="10"

Title="Configure usage reporting" >

<UrlAction Url="_layouts/SpUsageConfig.aspx"/>

</CustomAction>

<HideCustomAction

Id="HideWssSiteCollectionUsage"

HideActionId="SiteCollectionUsage"

GroupId="SiteCollectionAdmin"

Location="Microsoft.SharePoint.SiteSettings" />

<HideCustomAction

Id="HideWssWebUsage"

HideActionId="WebUsage"

GroupId="SiteAdministration"

Location="Microsoft.SharePoint.SiteSettings" />

<CustomAction

Id="PortalSiteUsage"

GroupId="SiteCollectionAdmin"

Location="Microsoft.SharePoint.SiteSettings"

Rights="ViewUsageData"

Sequence="30"

Title="Site usage data">

<UrlAction Url="_layouts/SpUsageSite.aspx" />

</CustomAction>

<CustomAction

Id="PortalWebUsage"

GroupId="SiteAdministration"

Location="Microsoft.SharePoint.SiteSettings"

Rights="ViewUsageData"

Sequence="30"

Title="Web usage data">

<UrlAction Url="_layouts/SpUsageWeb.aspx" />

</CustomAction>

</Elements>

Feature Element (Feature)

Defines a Feature to activate or deactivate at a specified scope.

<Feature

ActivateOnDefault = "TRUE" | "FALSE"

AlwaysForceInstall = "TRUE" | "FALSE"

AutoActivateInCentralAdmin = "TRUE" | "FALSE"

Creator = "Text"

DefaultResourceFile = "Text"

Description = "Text"

Hidden = "TRUE" | "FALSE"

Id = "Text"

ImageUrl = "Text"

ImageUrlAltText = "Text"

ReceiverAssembly = "Text"

ReceiverClass = "Text"

RequireResources = "TRUE" | "FALSE"

Scope = "Text"

SolutionId = "Text"

Title = "Text"

UIVersion = "Text"

Version = "Text" >

</Feature>

For Indepth understanding of SharePoint click on