Tuesday, July 14, 2009

Adding and Removing a button to the Ribbon ( SharePoint 2010 )

Scenario: Adding and Removing a button on the Ribbon. You can define the location on the Ribbon where you want the button to appear. Follow the below method to add a new button / remove the button to the Library tab in the Actions group for a document library.

How-To:

Create a folder under 14 hive\Template\Features (SharePoint 2010 will have 14 hive similar to that of 12 in WSS / MOSS 2007) RibbonButton

As seen in the previous post create the feature.xml

Create a blank xml file, manifest.xml and add the below content (Adding Button) to it and Save it.

Deploy the customization using Windows PowerShell as shown in my previous blog.

Test it by navigating to the document library in your site / sub site and clicking on the library tab > Actions group > New Button button.

To remove the button replace the content in the manifest.xml with the Removing Button content mentioned below.