如何从SharePoint中的“网站操作”菜单中删除项目?

时间:2023-01-21 15:23:39

How can I customise the Site Actions menu to remove or rename 'standard' menu items? Where are the site actions menu items defined?

如何自定义“网站操作”菜单以删除或重命名“标准”菜单项?网站操作菜单项定义在哪里?

3 个解决方案

#1


6  

The site actions menu is defined in the Siteaction.xml in Template\layouts\editingMenu under the 12 hive. The following link shows how to manually remove items.

站点操作菜单在12 hive下的Template \ layouts \ editingMenu中的Siteaction.xml中定义。以下链接显示了如何手动删除项目。

Customize Site Actions Menu

自定义网站操作菜单

I have added options to the menu using features, but have never tried to hide OTB option in code. I would be interested in your results.

我已经使用功能向菜单添加了选项,但从未尝试在代码中隐藏OTB选项。我会对你的结果感兴趣。

Good luck!

#2


2  

I was able to hide the menu item I wanted to hide by using ConfigMenu="Delete" in the relevant XML node of SiteActions.xml. e.g.

我可以使用SiteActions.xml的相关XML节点中的ConfigMenu =“Delete”来隐藏我想要隐藏的菜单项。例如

 <ConsoleNode ConfigMenu="Delete" ChangedNodeID="wsaCreateSite" />

The valid values for ConfigMenu are documented at http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.configmenuoptions.aspx

ConfigMenu的有效值记录在http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.configmenuoptions.aspx中。

#3


1  

I have used a control that runs javascript to hide the entire site actions menu for users of a certain privelege level.

我使用了一个控件来运行javascript来隐藏某个privelege级别用户的整个站点操作菜单。

That approach may be an option if you need to remove items for particular users.

如果您需要删除特定用户的项目,则可以选择该方法。

It is not the worlds classiest approach however.

然而,这不是世界上最经典的方法。

#1


6  

The site actions menu is defined in the Siteaction.xml in Template\layouts\editingMenu under the 12 hive. The following link shows how to manually remove items.

站点操作菜单在12 hive下的Template \ layouts \ editingMenu中的Siteaction.xml中定义。以下链接显示了如何手动删除项目。

Customize Site Actions Menu

自定义网站操作菜单

I have added options to the menu using features, but have never tried to hide OTB option in code. I would be interested in your results.

我已经使用功能向菜单添加了选项,但从未尝试在代码中隐藏OTB选项。我会对你的结果感兴趣。

Good luck!

#2


2  

I was able to hide the menu item I wanted to hide by using ConfigMenu="Delete" in the relevant XML node of SiteActions.xml. e.g.

我可以使用SiteActions.xml的相关XML节点中的ConfigMenu =“Delete”来隐藏我想要隐藏的菜单项。例如

 <ConsoleNode ConfigMenu="Delete" ChangedNodeID="wsaCreateSite" />

The valid values for ConfigMenu are documented at http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.configmenuoptions.aspx

ConfigMenu的有效值记录在http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.configmenuoptions.aspx中。

#3


1  

I have used a control that runs javascript to hide the entire site actions menu for users of a certain privelege level.

我使用了一个控件来运行javascript来隐藏某个privelege级别用户的整个站点操作菜单。

That approach may be an option if you need to remove items for particular users.

如果您需要删除特定用户的项目,则可以选择该方法。

It is not the worlds classiest approach however.

然而,这不是世界上最经典的方法。