分类: 系统运维
2008-03-30 08:56:18
步骤1: 创建一个Feature.xml文件
在Features目录下创建一个目录例如mymenu,在其中创建一个Feature.xml文件,文件内容如下:
Title="my custom menu"
Description="this is a custom menu"
Version="1.0.0.0"
Scope="Web"
Hidden="FALSE"
DefaultResourceFile="customDocumentLibrary"
xmlns="">
步骤2: 创建Feature的描述文件lightup.xml
文档的内容如下:
Location="Microsoft.SharePoint.SiteSettings"
Sequence="106"
Title="Custom Litware Site Setting Command">
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Litware custom Action"
Description="custom litware site action"
ImageUrl="/_layouts/images/ACL16.GIF">
RegistrationType="List"
RegistrationId="101"
GroupId="NewMenu"
Rights="ManagePermissions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Litware Custom New Command"
Description="THis Command Creates a new Litware doc"
ImageUrl="/_layouts/images/ACL16.GIF">
RegistrationType="List"
RegistrationId="101"
GroupId="ActionsMenu"
Rights="ManagePermissions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Litware Command on Document Library"
Description="THis Command Creates a new Litware doc"
ImageUrl="/_layouts/images/ACL16.GIF">
RegistrationType="List"
RegistrationId="101"
Type="ECBItem"
Location="BugWorkaround:LocationShouldEqualEditControlBlock"
Sequence="106"
Title="Litware ECB item Command">
其中第一个CustomAction在Site Setting页面中的LOOK AND FEEL标题下创建了一个自定义链接.第二个CustomAction在页面的Site Action菜单下增加了一个用户自定义菜单项.第三个CustomAction在文档库的New下拉菜单下创建了一个自定义菜单项.第四个CustomAction在文档库的Action下拉菜单下创建了一个自定义菜单项.
注意第五个CustomAction本来是在文档库的每个列表项的菜单上增加一个菜单项,但是不知什么原因不能正确加入,有待进一步的研究.
步骤3 安装Feature
在Cammand窗口下运行:
iisreset
Stsadm -o installfeature -filename mymenu\feature.xml