5/01/2011

Adding a Blank Tab to the Server Ribbon : SharePoint 2010

Adding a Blank Tab to the Server Ribbon : SharePoint 2010

Code :
<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<CustomAction
Id="MyCustomRibbonTab"
Location="CommandUI.Ribbon.ListView"
RegistrationId="101"
RegistrationType="List">

<CommandUIExtension>

<CommandUIDefinitions>

<CommandUIDefinition
Location="Ribbon.Tabs._children">

<Tab
Id="Ribbon.CustomTabExample"
Title="My Custom Tab"
Description="This holds my custom commands!"
Sequence="501">

<Scaling
Id="Ribbon.CustomTabExample.Scaling">

</Scaling>

<Groups Id="Ribbon.CustomTabExample.Groups">

</Groups>

</Tab>

</CommandUIDefinition>

</CommandUIDefinitions>

<CommandUIHandlers>

<CommandUIHandler
Command="CustomTabExample.HelloWorldCommand"
CommandAction="javascript:alert('Hello, world!');" />

</CommandUIHandlers>

</CommandUIExtension>

</CustomAction>

</Elements>

0 comments: