Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a sharepoint server. It based on sharepoint foundation 2010.

I want to move the check-in and check-out button to left of the tab. To add a new button is easy to be done. I have just to use a Element.xml to add a new one.

But I have no idea about how to 'move' the buttons.

Hope someone helps me.

Regards,

share|improve this question

2 Answers 2

up vote 0 down vote accepted

In Ribbon customization you can add, modify and remove elements. The order of the buttons is ruled by the Sequence attribute in the button definition XML. You cannot change it on the OOTB buttons but you can replace them with the identical and set the new Sequence indexes in the new buttons. You need to look at CMDUI.xml, get the full XML for target buttons and place them in the CustomAction. To replace old buttons you need to set exactly the same locations in the CommandUIDefinition.Location attribute.

UPDATE: If you want not just to affect ordering of the buttons in the same group but to MOVE the buttons into the another group then you need to hide original buttons and add new buttons to the desired group that will clone all the original buttons XML markup. To hide the original buttons you need to create an empty modification with the same CommandUIDefinition.Location attribute value. Then you need to add the new buttons to the desired location as I described above. The example of the removing: http://msdn.microsoft.com/en-us/library/ff408060.aspx. The example of adding: http://msdn.microsoft.com/en-us/library/ff407458.aspx. Note the CommandUIDefinition.Location attribute you asked about. Official locations you need to use to hide and to add buttons can be found here. Another way is to open OOTB CMDUI.xml file that contains OOTB Ribbon markup and to find the right locations.

share|improve this answer
    
Thank you, Alex. Where should I put CommandUIDefinition.Location attribute? I want to move check-out button from Ribbon.Documents.EditCheckout group to Ribbon.Documents.New group. –  Toste Mar 2 '12 at 1:16
    
See the update. –  Alex Boev Mar 2 '12 at 7:46
    
Thank you! I will make a new button. –  Toste Mar 2 '12 at 13:14

This is a BAD idea. You really should just leave them where they are to ensure consistency across all SharePoint instances. You're creating a user experience that is quite a deviation from the normm. How are your users going to handle the next SharePoint environment they work in? How are users who know SharePoint find things when you move their cheese?

share|improve this answer
    
You are right. I have decided to make a new button having same function with delete button. Thank you ! –  Toste Mar 2 '12 at 13:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.