I need to get CUI.Tab object by id/index from current Ribbon by javascript:

var ribbon = (SP.Ribbon.PageManager.get_instance()).get_ribbon();

var tab = SomePublicMethodToGetTabFromRibbonByIdOrIndex(); // <--- Subj

var group = new CUI.Group(ribbon, 'Sample.Tab.Group', 'Sample Group', 'Description', 'Sample.Group.Command', null);
var layout = new CUI.Layout(ribbon, 'Sample.Layout', 'The Layout');    

group.selectLayout('The Layout');
SelectRibbonTab('Standard tab', true);

I didn't found any public method for it, though. Am I missing something, or should I override the whole tab now?

1 Answer 1


Try this code

var tab = ribbon.getChild(your_tab_id);

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.