Kindly suggest, how to hide/show Ribbon on the fly in SharePoint 2013?
-
What is on the fly? What are you looking for - the navigation bar that runs along the top of the screen or are you viewing a list or something else?– TallyCommented Jan 4, 2018 at 11:09
-
Thanks for reply, # On the fly, means user could be do hide/show as they want from browser at a time. # I need to hide/show blue ribbon and it's immediate next grey ribbon. Cheers for more reply.– M JainCommented Jan 4, 2018 at 12:00
2 Answers
Select "Gear" icon from top right then click "Show Ribbon" option if it not showing there and do the following to enable/disable it.
Go to "Site settings->Navigation->Under
Show and Hide Ribbon
heading->choose Yes/No" click save.
This will allow user to view/hide ribbon on the fly.
if you want to hide the bluebar(i.e. SuiteBar) you have couple of options:
- Add security trimmed control to check user permission and hide it.
- Inside a common CSS file or add the below css in content editor webpart
#suiteBar, #s4-ribbonrow{display:none}
-
Thanks for reply, # Actually "Show/Hide Ribbon" is showing there but once click on it nothing happened. Once click on "Hide Ribbon" blue ribbon still appeared. # In "Site Settings --> Navigation" section already set as Yes. Cheers for more reply.– M JainCommented Jan 4, 2018 at 11:39
-
Can you clarify what you want to show/hide.. SuitBar(blue bar) or Ribbon?? above config will only work to show/hide ribbon. if you want to show/hide 'suitebar' you need to do via css or
masterpage security trimmed control
Commented Jan 4, 2018 at 11:40 -
# I need to hide/show Blue bar and immediate next Grey bar Ribbon. as like image attached in my question. # I applied "Show/Hide Ribbon" from Site Action but still Ribbon (grey bar) there, not disappeared. Cheers– M JainCommented Jan 4, 2018 at 12:05
-
ok, do you want to hide bluebar based on user permission or for everyone? Commented Jan 4, 2018 at 12:07
-
We can add the CSS style below into tag in the master page using SharePoint designer to achieve it.
<style>
.ms-designer-ribbon{
display:none !important;
}
</style>
-
The question was about hiding it and showing it "on fly", which roughly would mean that the ribbon is hidden unless interacted to become visible. Your solution simply hides it for good.– moeCommented Jan 5, 2018 at 7:39