Adding a Ribbon to SharePoint 2010
If you take a look to HOL10 - Developing SharePoint 2010 User Interface Ribbon and Dialog Customizations: http://www.microsoft.com/downloads/details.aspx?FamilyID=c010fc68-b47f-4db6-b8a8-ad4ba33a35c5&displaylang=en you will notice that this Hands on Lab will not work for the public beta. If you want to follow this lab and make it work, please update your elements.xml to the next code:
<?xml version="1.0" encoding="utf-8"?>
<!-- also take a look at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="Hello_world"
RegistrationType="List"
RegistrationId="101"
Location="CommandUI.Ribbon"
Sequence="5">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Documents.Manage.Controls._children">
<Button
Id="Ribbon.Documents.New.DemoHelloWorldButton"
Alt="Hello World Ribbon Button"
Sequence="5"
Command="Demo_HelloWorld"
Image32by32="_layouts/images/YourProject/YourImage.jpg"
LabelText="Hello World Demo"
TemplateAlias="o1"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="Demo_HelloWorld"
CommandAction="javascript:alert('Hello World!');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
[/code]
You can view this Ribbon if you navigate to the Documents Folder. If you want to make a Ribbon visible on other places (e.g. page which actually is a WikiPageTab) take a look to this file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML in your SharePoint root. In the CMDUI.XML you can find the definitons of the default Ribbons which could be helpfull to extend it with your own. E.g. you can find group ID's and sequences of the Ribbons.
If you want to extend the SiteActions menu you can take a look at the next elements.xml code
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="UserInterfaceCustomActions.SiteActionsToolbar"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="MY SITE ACTIONS BUTTON">
<UrlAction Url="javascript:alert('Hello World!');"/>
</CustomAction>
</Elements>