Ribbon on all webpart pages

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

Hello,

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. 

 

Coordinator
Apr 18, 2012 at 1: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 1: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.

Coordinator
Apr 18, 2012 at 1: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 1: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?

Coordinator
Apr 18, 2012 at 9: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.