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'm looking for the location of SharePoint ribbon XML for List Views. I'm just curious to see how Microsoft has coded it. However, I don't know the location of the xml file. Could someone put me in the right direction?

Thanks!

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

All the ribbon definitions are stored in this file:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML

Action JS code for most of these ribbon elements you can find here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.Ribbon.debug.js

Actions for rich text editor ribbon are stored here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.UI.Rte.debug.js

share|improve this answer
    
+1 for JavaScript code! Thanks dude! –  Pathachiever11 Jun 2 '12 at 14:58
add comment

Copy the following XML into Feature's Elements.xml and try to play with params. The location is CommandUI.Ribbon.ListView

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
  Id="ShowHelloWorldButton"
  RegistrationType="List"
  RegistrationId="100"
  Location="CommandUI.Ribbon.ListView"
  Rights="EditListItems">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
         Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
           Id="Ribbon.ListItem.Actions.Controls.ShowHelloWorldButton"
           Alt="Show HelloWorld Alert"
           Sequence="1"
           Image32by32="/_layouts/DemoSharePointRibbon/HelloWorld.jpg"
           Command="ShowHelloWorldCommand"
           LabelText="Hello World"
           TemplateAlias="o1"
           CommandType="General"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
         Command="ShowHelloWorldCommand"
         CommandAction="javascript:alert('Hello World');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>

Location of Ribbon XML file is :

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML

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.