我已经创建了一个功能,该功能(根据许多文章)从快速启动中删除"站点内容"链接。
一个问题:这不会发生。
这是我的elements.xml中的内容:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<HideCustomAction
Id="HideSiteContents"
GroupId="SiteActions"
HideActionId="MenuItem_ViewAllSiteContents"
Location="Microsoft.SharePoint.StandardMenu">
</HideCustomAction>
<CustomAction Id="SiteActionsToolBar" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Added test button">
<UrlAction Url="javascript:alert('Button was added and working');" />
</CustomAction>
</Elements>
测试按钮被添加到站点设置菜单(显示文件已读取和工作),但我无法删除此类网站内容链接。
鉴于我正在受到的约束,通过功能进行此操作是唯一可以接受的解决方案 - 我当然可以通过其他方式来执行此操作,但这不会导致可行的解决方案。
我的猜测您将其部署为沙盒解决方案?
HideCustomAction需要部署作为农场解决方案。