Monday, February 13, 2012

Hide the Ribbon in Anonymous Mode

Go to your master page and find the "s4-ribbonrow" div:
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
Add inline style "display:none" to it:
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
Insert the following code AFTER the s4-ribbonrow div closes:
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">
    <script type="text/javascript">
        document.getElementById("s4-ribbonrow").style.display = "block";
   
</script>
</
Sharepoint:SPSecurityTrimmedControl>
Read more at:

No comments:

Post a Comment