カスタム アクション定義のスキーマ

適用対象: SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013

カスタム アクションは、XML ドキュメントで定義され、フィーチャーの一部として展開されます。

XML スキーマ定義

カスタム アクションを定義する XML ドキュメントは、wss.xsd ファイルで定義されたスキーマで検証する必要があります。 このファイルは、次のパスにあります。 %ProgramFiles%\\Common Files\\Microsoft Shared\\web server extensions\\15\\TEMPLATE\\XML

要素

注釈

CustomActionGroup 要素には、カスタム アクションのグループのコア定義が含まれます。

UrlAction 要素を使用して、カスタム アクションの URL を指定する必要があります。 アクションが指定されていない場合 (エラー状態)、リンクは表示されるだけで、どこにもリンクされません。

HideCustomAction 要素を使用して、Microsoft SharePoint Foundation Features のインフラストラクチャ内または別のカスタム アクション内で既定で実装されている既存のアクションを非表示にします。 既定のカスタム アクション ID の一覧については、「Default Custom Action Locations and IDs」を参照してください。

次の例は、コンテンツが SharePoint Foundation ページの既定のアクションを新しいアクションに置き換える 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>

関連項目