views:

14

answers:

1

I want to create a ribbon button that will work with all kinds of lists. I mean, the same custom action should work against lists, document libraries, Announcement lists, etc..

Also. It should work regardless of the content types contained in the list.

What should be the custom action definition for this?

A: 

I don't have an easy way to test this, but I believe you'd define your Elements.xml file according the the Custom Action and Ribbon schemas as usual, but omit the RegistrationId and RegistrationType attributes on the CustomAction element:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    <CustomAction
        Id="[Your.Ribbon.ID.Here]"
        Location="CommandUI.Ribbon.[Your.Location]">
            <!-- Your Ribbon Definitions Here -->
    </CustomAction>
</Elements>
CBono