SP2010 Branding Tip #10 – Hide Ribbon Completely for Anonymous Users 1

This question came in as a comment on a previous blog post. I’m sure there may be better ways to do this, but one thing I did on the http://beta.sharepoint911.com site was to hide the ribbon completely for non authorized users. I did this by using an asp:LoginView with an AnonymousTemplate and hiding the CSS.


<asp:LoginView id="LoginView" runat="server">
<AnonymousTemplate>
<style type="text/css">
body #s4-ribbonrow {
display: none;
} 
</style>
</AnonymousTemplate>
</asp:LoginView>

Of course if you do this, you will probably need to handle creating a login link for your authorized users yourself.

One comment on “SP2010 Branding Tip #10 – Hide Ribbon Completely for Anonymous Users

  1. Reply Jay Aug 19,2013 8:44 am

    We’ve been hiding our ribbon for quite some time.

    Post SP2, however, we found out that if the ribbon is disabled and you have or add a content editor to a page, you may not add any more web parts to the page.

    We’ve had someone else confirm that they can reproduce the problem utilizing a stock site and your ribbon hiding instructions.

    Just wondering if you’ve seen the issue as well, and if you’ve discussed it at all with Microsoft.

Leave a Reply