I wonder is there any ability to set not only one but multiple values of RegistrationId in CustomAction tag.

I have an elements.xml entry like this:


Does anyone know how should I modify it to add another two RegistrationIds?


3 Answers 3


As a general rule, XML attributes aren't designed to have more than one value.

Interestingly, the attribute seems to be optional, so it may be possible to apply it to a great many places at once by leaving it out (probably too many).

My only other suggestion would be to do a good old fashioned copy-paste and have one CustomAction element for each RegistrationId needed.

  • 1
    Yep, you can pass both RegistrationId & RegistrationType over, and this will apply your ribbon modifications on all the lists. Apr 15, 2011 at 22:32
  • @omlin: I tried this approach, if RegistrationId and RegistrationType omitted then my tab doesn't show up anywhere. Apr 18, 2011 at 10:12
  • @MrBubbles: How about if you just omit RegistrationId?
    – Stu Pegg
    Apr 18, 2011 at 10:17
  • @Stuart Pegg: Tried to solve problem in this way too. But got the same situation: the tab simply doesn't show up. Apr 18, 2011 at 13:52
  • @MrBubbles: Looks like either copy & paste or @omlins alternative answer are the way to go, then.
    – Stu Pegg
    Apr 18, 2011 at 13:56

What you're really looking for, is SharePoint 2010 Fluent Ribbon API. It is a Codeplex project, which simplifies work with ribbon. It has in-depth documentation, including huge amount of samples and screenshots.

The only bad thing about this solution, is that you should rewrite your XML ribbon definition to FluentRibbon ribbon definition. But code definitions are much more flexible, and also FluentRibbon provides some extra features: simplified syntax, full-length documentation and qualitative validation, so IMO, it's worth it.

In your case, the resulting code will look like this (inside feature receiver class, in FeatureActivated method):

var myTab = new TabDefinition
    Id = "MyTab",
    Title = "My tab",

    // etc, create your definition here...

// instantiate RibbonCustomAction class
var ribbonCustomAction = new RibbonCustomAction();

// add one or more ribbon definitions, which will be deployed
// in same scope.
// RibbonCustomAction acts like a container for such definitions.

// Let's provision our custom action
// receiverGuid is a random constant Guid, which must be unique
// in the feature scope. It is used for cleanup in FeatureDeactivating
// method.

// Next, we can provision the same custom action again and again to different
// locations. For example, let's register it for Links list:

Btw, Provision method has many overloads, in easiest case you should provide only 2-3 params.

You can find more samples at the project site.

P.S. Please, do not forget to add reference to RibbonUtils.dll & add record into GAC deployment list (Package.package, 'Advanced tab', Add -> Existing assembly)

  • Thanks for your solution, but I don't really know if our customer wants to deploy anything into GAC so maybe i'll try this approach later. Apr 18, 2011 at 14:07

This can be accomplished by duplicating the CustomAction xml section. Just copy the entire custom action section and paste below 1st CustomAction xml section and change RegistrationId to the next RegistrationId you want it to show up in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.