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" Image32by开发者_运维问答32Left="-288"
/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="ChangeLinkOrder" CommandAction="javascript:alert('Please check Change Item Order');"></CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
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.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!--Change Item order Ribbon-->
<CustomAction
Id="XYZ.Webpart.Links.XYZLinksListDefinition.RibbonSortOrderButton"
Location="CommandUI.Ribbon"
RegistrationId="30099"
RegistrationType="List"
Title="List View Ribbon Customization" >
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
<Button
Id="Ribbon.ListItem.Actions.RibbonSortOrderButton"
Sequence="25"
Command="ChangeLinkOrder"
Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-192" Image16by16Left="-144"
Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-192" Image32by32Left="-288"
LabelText="$Resources:core,cui_ButChangeItemOrder;"
ToolTipTitle="$Resources:core,cui_ButChangeItemOrder;"
ToolTipDescription="$Resources:core,cui_STT_ButChangeItemOrder;"
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
Invalid value for attribute location in customaction element, choose right location value from here http://msdn.microsoft.com/en-us/library/bb802730.aspx
精彩评论