Thursday, June 16, 2011

Ribbon customization - Part 7


In this post, we are going to cover a small change to our existing XML from the last part. If you have not gone through Part 1 to Part 6part 6, I recommend you read them first and then continue reading from here.

Let us talk more about tabs in the ribbon. We have seen how to create tab and add groups and controls to it. But what we have not discussed it, where all places you can add tab. You can add tab individually. This is what we have done. Below image shows adding individual tab in the ribbon.














Now what we are going to do is add this existing tab in the existing built in list tab. You will come to know when you make a small change in the XML that we took in our last post.

<CustomAction    Id="SPKings.Ribbon.CustomTab"
                   Location="CommandUI.Ribbon" Sequence="401" RegistrationId="100" RegistrationType="List" GroupId="ListContextualGroup">


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

What we have done here is we have given the existing groupID as ListContextualGroup, that means we want to add our tab in the existing list tools contextual tab. And we have also changed the RegistraionID to 100 which is list not the library.

When changing the UIDefinition, we have mentioned that we want to add tab in the existing ListcontextualGroup.

And here is what we get after making these small two lines change.











As you can see our Utilities tab is now under existing list tools contextual tab. Keep reading Part-8 of this series.


2 comments:

Anonymous said...

Do you know what i have to set into registrationtype and registrationid when i want to show a new tab in the contextual tab EditingTools?

Anonymous said...

Do you know what i have to set into registrationtype and registrationid when i want to show a new tab in the contextual tab EditingTools?




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com