As such I often have to remove it from the UI. I have found that the best way to do this is through the CSS style sheets and a little SPSecurityTrimmedControl magic in the site Master Page. Here are the steps to quickly and easily remove this bar for people who are not authoring on the site:
- Open your SharePoint master page
- Locate this line:<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
- Change it to:<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
- Now find the end of the “s4-ribbonrow” tag and add following block right
after it:
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages"> <script type="text/javascript"> document.getElementById("s4-ribbonrow").style.display = "block"; </script> </Sharepoint:SPSecurityTrimmedControl>
- Save the new master page and publish
No comments:
Post a Comment