Snippets of code and fun.
Have you ever noticed how in SharePoint 2010 Owners see the ribbon and can click Site Actions, and Readers see the ribbon too but there is no Site Actions to click. In some cases there is nothing else going on up there for Readers. It is wasted real estate!
The Reader can use all the extra space for some website goodness!
This is easy to solve.
- Open the master page, find the div tag: <div id="s4-ribbonrow"- Put the following around it: <Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb"><div id="s4-ribbonrow" …</div></SharePoint:SPSecurityTrimmedControl>
More info here:
- http://social.technet.microsoft.com/Forums/en/sharepoint2010customization/thread/9e52de43-7941-4e61-976b-d6bf2f8d926c- http://fusionovation.com/blogs/mbell/archive/2008/09/18/security-trimmed-controls-in-sharepoint.aspx- http://sharepoint.smayes.com/2011/02/hiding-the-sharepoint-2010-ribbon-for-readers-a-proof-of-concept/
var ribbonRow = document.getElementById("s4-ribbonrow");
if(ribbonRow.innerHTML.indexOf("Browse") == -1)
ribbonRow.style.display = "none";