在 Sharepoint 2010 中添加更改项目订单功能区
我想将更改项目订单功能区添加到功能区面板中。我已经创建了功能并激活,但是我仍然看不到商品订单功能区。谁能帮我解决这个问题吗? 下面是我的代码
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!--Change Item order Ribbon-->
<CustomAction
Id="SPChangeItemOrder"
Location="CommandUI.Ribbon.ListItem"
RegistrationId="101"
RegistrationType="List"
Title="List View Ribbon Customization"
>
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
<!--Get Details from CMDUI.XML-->
<Button
Id="Ribbon.ListItem.Actions.ChangeItemOrder"
Alt="Change the order of the items in this list."
Sequence="20"
Command="ChangeLinkOrder"
LabelText="$Resources:core,cui_ButChangeItemOrder;"
ToolTipTitle="$Resources:core,cui_ButChangeItemOrder;"
ToolTipDescription="$Resources:core,cui_STT_ButChangeItemOrder;"
TemplateAlias="o2"
Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-192" Image16by16Left="-144"
Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-192" Image32by32Left="-288"
/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="ChangeLinkOrder" CommandAction="javascript:alert('Please check Change Item Order');"></CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
I want to add Change item order ribbon into ribbon panel. I have created feature and activated, however i still cant see the item order ribbon. Can anyone help me with this?
below is my code
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!--Change Item order Ribbon-->
<CustomAction
Id="SPChangeItemOrder"
Location="CommandUI.Ribbon.ListItem"
RegistrationId="101"
RegistrationType="List"
Title="List View Ribbon Customization"
>
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
<!--Get Details from CMDUI.XML-->
<Button
Id="Ribbon.ListItem.Actions.ChangeItemOrder"
Alt="Change the order of the items in this list."
Sequence="20"
Command="ChangeLinkOrder"
LabelText="$Resources:core,cui_ButChangeItemOrder;"
ToolTipTitle="$Resources:core,cui_ButChangeItemOrder;"
ToolTipDescription="$Resources:core,cui_STT_ButChangeItemOrder;"
TemplateAlias="o2"
Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-192" Image16by16Left="-144"
Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-192" Image32by32Left="-288"
/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="ChangeLinkOrder" CommandAction="javascript:alert('Please check Change Item Order');"></CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试类似的操作,其中 RegistrationID 是列表定义的 Type 值。如果您想使用 SharePoint 的 OOB 更改项目顺序命令,则不需要 CommandUIHandler。
Try something like this where RegistrationID is the Type value of a list definition. You don't need the CommandUIHandler if you want to use SharePoint's OOB Change Item Order command.
Customaction 元素中的属性位置值无效,请从此处选择正确的位置值 http:// msdn.microsoft.com/en-us/library/bb802730.aspx
Invalid value for attribute location in customaction element, choose right location value from here http://msdn.microsoft.com/en-us/library/bb802730.aspx