读书人

sharepoint 2010 怎么在Ribbon区添加功

发布时间: 2012-12-25 16:18:29 作者: rapoo

sharepoint 2010 如何在Ribbon区添加功能按钮

继续前面的一篇博客,sharepoint 2010 如何在列表中添加功能菜单操作项,这次主要是记录下,在Ribbon区域添加功能按钮,例如添加收藏按钮,如下图所示:

sharepoint 2010 怎么在Ribbon区添加功能按钮

1。还是一样,添加一个空元素,CollectionRibbonItem

修改XML文件代码,在<elements></elements>标签中,添加CustomAction,

<CustomAction Id="LibraryRibbonButton" Location="CommandUI.Ribbon.ListView" RegistrationId="101" RegistrationType="List" Title="收藏">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Documents.Share.Controls._children">
<Button Id="CollectionRibbonItem" Image32by32="/_layouts/2052/images/formatmap32x32.png" Command="CollectionRibbonItem" Description="收藏喜欢的文档" LabelText="收藏" TemplateAlias="o2"
Sequence="93"
/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="CollectionRibbonItem" CommandAction="/_layouts/WebpartBarTest/CollectionEdit.aspx?scope=library&ListId={ListId}&Itemid={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
2。部署到网站上,就可以了。

相关资料:http://www.cnblogs.com/wsdj-ITtech/archive/2012/04/02/2280987.html

一、下面是Sharepoint2010中的一些常用到的关于Ribbon中的与List或Libraries操作相关的Location值

CommandUIDefinition Location For Lists -

DisplayForm.aspx (View Properties) -
Actions Group Ribbon.ListForm.Display.Actions.Controls._children

Manage Group - Ribbon.ListForm.Display.Manage.Controls._children

Edit Form (Edit Properties) -

Actions Group Ribbon.ListForm.Display.Actions.Controls._children

Commit Group - Ribbon.ListForm.Display.Commit.Controls._children

Clipboard Group - Ribbon.ListForm.Display.Clipboard.Controls._children

NewForm (New Item) -

Actions Group Ribbon.ListForm.Display.Actions.Controls._children

Commit Group - Ribbon.ListForm.Display.Commit.Controls._children

Clipboard Group - Ribbon.ListForm.Display.Clipboard.Controls._children

Items Tab (AllItems.aspx) -
New Group Ribbon.Items.New.Controls._children

Manage Group Ribbon.Items.Manage.Controls._children

Actions Ribbon.Items.Actions.Controls._children

Workflows Ribbon.Items.Workflows.Controls._children

List Tab (AllItems.aspx) -
View Format Ribbon.List.ViewFormat.Controls._children

Datasheet Ribbon.List.Datasheet.Controls._children

Manage Views Ribbon.List.ManageViews.Controls._children

Share Track Ribbon.List.ShareTrack.Controls._children

Customize List Ribbon.List.CustomizeList.Controls._children

Settings Ribbon.List.Settings.Controls._children

http://msdn.microsoft.com/en-us/library/gg552606(v=office.14).aspx

广州京微信息科技有限公司,.微软sharepoint解决方案提供商。

3楼allen9408173小时前
学习了。
2楼dan_guangzhou10小时前
收藏下。
1楼sharepoint120昨天 18:23
挺详细的。

读书人网 >软件架构设计

热点推荐