Ribbon on all webpart pages

Apr 18, 2012 at 1:56 AM
Edited Apr 18, 2012 at 1:59 AM


I would like to have ribbon on all web part pages without use of Contextual Ribbon. Is this possible? I can't use RibbonLayoutsPage.

I also would like to activate Contextual Ribbon when user opens the page not when user5 clieck on web part, can this be done?

Great project. 


Apr 18, 2012 at 2:03 AM

Hi ibondy,

Thanks for your feedback!

Yes, it can be done. Please, consider the following post from my blog: Add ribbon tab to all site pages using Fluent Ribbon API.

Apr 18, 2012 at 2:07 AM

Ok, thanks. This will create one Tab in Ribbon. Is there a way of creating multiple Tabs? I would prefer not to create 3 different controls, one for each Tab.

Apr 18, 2012 at 2:13 AM

You can achieve this using RibbonController.AddRibbonTabToPage method. Define your ribbon tabs, and then just call this method 3 times on page load, passing the previously created definitions.

Apr 18, 2012 at 2:30 AM

RibbonController.AddRibbonTabToPage work great. That's what I was looking for. One more question. Howe can I make ribbon for ContextualWebPart be visible when user loaded the page and did not clicked the webpart?

Apr 18, 2012 at 10:48 AM

If you want to have a non-contextual tab, which is always visible, just use RibbonController in your webpart instead of inheriting from the ContextualWebPart class.