Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to remove a custom tab on the ribbon. Is this possible with HideCustomAction?

I have attempted using HideCustomAction with the location and HideActionId set for the desired tab to be removed but it doesn't appear to be working. I see lots of samples for hiding groups or buttons but not the entire tab.

The tab that I would like to hide is one that is shown for document libraries (like the Library tab)

The solution for me was the following

<CustomAction
Id="RemoveRibbon"
Location="CommandUI.Ribbon.ListView"
RegistrationId="101"
RegistrationType="List">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.CustomTab1"></CommandUIDefinition>
    <CommandUIDefinition Location="Ribbon.CustomTab1.CustomGroup1.UpdateFolders"></CommandUIDefinition>
    <CommandUIDefinition Location="Ribbon.CustomTab1.CustomGroup1.Update2Folders"></CommandUIDefinition>        
  </CommandUIDefinitions>     
</CommandUIExtension>

The caml above specified the location of the ribbon 'CommandUI.Ribbon.ListView', the id of the tab 'Ribbon.CustomTab1' then the id's for each button that was in the tab i.e. 'Ribbon.CustomTab1.CustomGroup1.UpdateFolders' and 'Ribbon.CustomTab1.CustomGroup1.Update2Folders' (they are specified as id's in the custom action that put them on the ribbon but here they are the location property)

share|improve this question
    
David, could you please work on your accept rate? 0% is a really dissapointing result... Accepted answers help other people to quickly determine the correct solution of their problem, and encourage experts here on site to answer the questions. –  Andrey Markeev Oct 29 '11 at 9:55
add comment

1 Answer

up vote 3 down vote accepted

Yes, that's possible but not with HideCustomAction. You can do this with a CustomAction. Take a look at: Hiding a Tab Group from a custom list type in SharePoint 2010′s Ribbon

share|improve this answer
    
+1, and thanks for your input, I can attest that the article link is correct. But it would better to add a particular CAML code example right here, even if it is just a copy-paste from the article. It believed to be a good practice. For details, please have a look at this meta discussion: meta.sharepoint.stackexchange.com/questions/117/… –  Andrey Markeev Oct 29 '11 at 9:50
    
The solution for me was the following –  David Oct 30 '11 at 15:30
    
Edit this answer so i can mark it + and correct –  David Oct 31 '11 at 1:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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