SharePoint 自定义菜单项

转载http://ceapet.com/blog/?p=359

参考文献:

How to: Add Actions to the User Interface

http://msdn.microsoft.com/en-us/library/ms473643.aspx

CustomAction Element (Custom Action)

http://msdn.microsoft.com/en-us/library/ms460194.aspx

自己操作的时候遇到两个问题,先与大家分享

<?xml version=”1.0″ encoding=”utf-8″ ?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<!– Per Item Dropdown (ECB)–>
<CustomAction
Id=”mossmenu.ECBItemToolbar”
RegistrationType=”ContentType”
RegistrationId=”0×01001BC13DAE52189947A8BCFDB0C4D2F541″
Location=”EditControlBlock”
Sequence=”106″
ImageUrl = “_layouts/images/ICEST.GIF”
Rights=”ManageLists”
Title=”自定义的操作”>
<UrlAction Url=”/_layouts/mossmenu.aspx?ID={ItemId}&amp;ListID={ListId}”/>
</CustomAction>
</Elements>

将菜单绑定到指定的内容类型上

RegistrationType=”ContentType”
RegistrationId=”0×01001BC13DAE52189947A8BCFDB0C4D2F541″

stsadm -o installfeature -filename MOSSMenu"feature.xml
stsadm -o activatefeature -filename MOSSMenu"feature.xml -url http://moss
iisreset

保存在install.bat文件中安装部署,特别注意,-filename后的文件名相对路径即可,切不可是绝对路径,否则出错!

原文地址:https://www.cnblogs.com/liuzhengdao/p/1300590.html