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 attempted to create my first Custom Ribbon action to allow users to sort list items. But I failed miserably. the Action wont show in my ribbon at all and I am having trouble finding out what is wrong. I created an empty element and stuck the following code inside.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">


  <CustomAction
          Id="Ribbon.Library.Actions.AddAButton"
          Location="CommandUI.Ribbon"
          RegistrationId="10000"
          RegistrationType="List">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
          Location="Ribbon.List.Settings.Controls._children">
          <Button Id="Ribbon.Library.Share.NewRibbonButton"
            Command="NewRibbonButtonCommand"
            Image16by16="{SiteUrl}/_layouts/images/siteIcon.png"
            Image32by32="{SiteUrl}/_layouts/images/siteIcon.png"
            LabelText="Reorder Videos"
            TemplateAlias="o2" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="NewRibbonButtonCommand"
          CommandAction="{SiteUrl}/_layouts/Reorder.aspx?List={ListId}" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>

</Elements>
share|improve this question
add comment

3 Answers

Have a look at Chris O'Brien's samples and his excellent series of posts on developing Ribbon UI:

Samples Series first post

share|improve this answer
    
thanks for the responses! I found this link was the most helpful. mpdsharepoint.blogspot.com/2012_01_01_archive.html –  Tha Media Guy Mar 16 '12 at 16:35
add comment

Title is required attribute in CustomAction.

share|improve this answer
add comment

I used this article to add an Order Column to my List and add the action to my content type for the list item. This is working now.

http://mpdsharepoint.blogspot.com/2012_01_01_archive.html

Next I am trying to Sort by this column in Code using Visual Studio and a CAML query. Although when Using U2U CAML Builder it wont allow this column to be picked. It is a hidden internal column. Has anyone had success doing this??

Thanks.

share|improve this answer
add comment

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.