Location of Ribbon XML for List View
-
09-12-2019 - |
Question
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!
Solution
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
OTHER TIPS
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