Hide Ribbon Bar from Anonymous Users

A quick and simple way to hide the ribbon bar from anonymous users is to add the snippet of code to your Master Page or Page Layout.  When I first discovered this, my response was…”oh….DUH!!”

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

The idea is simple.  Use the ASP.NET LoginView control to add a conditional CSS block that hides the entire blue ribbon row.

Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

Your email address will not be published. Required fields are marked *