There are a few things that when you are designing a site (specially an internet facing one) that you have to do, and always forget how to (well, I do), such as Hiding the ribbon from anonymous users. This post is my Cheat Sheet for such events. I hope you find it useful 🙂 I will update with posts as I go. I know these things seem ‘silly’ to post, but it can save you some Bing time 🙂
1. Hiding the Ribbon from anonymous users
Find the “s4-ribbonrow” tag and wrap it in the below code.
1 |
< SharePoint:SPSecurityTrimmedControl PermissionsString = "ManagePermissions" runat = "server" > |
2 |
< div id = "s4-ribbonrow" class = "s4-pr s4-ribbonrowhidetitle" > |
3 |
<!-- Ribbon code appears here... --> |
4 |
</ div > |
5 |
</ SharePoint:SPSecurityTrimmedControl > |
2. Hide the Quick Launch Bar and move the content to the left
The simplest way is to use the CEWP trick that worked even back in 2003, just add a the Web Part add the style text in the HTML Source mode:
/*--Hide Quick Launch --*/
#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}
3. Adding a Style Sheet that overrides core4.css
Add this between your <head </head> tags:
<SharePoint:CssRegistration name=”/Style Library/sitename/style.css” After=”corev4.css” runat=”server”/>