Wednesday, May 26, 2010

Hide “View All Site Content” SharePoint 2010 Link

Along the same lines as hiding the Ribbon for normal site visitors, most users do not need to view the underlying site content structure. In this security trimming example I have set the PermissionsString to ManageWeb as it is primarily site owners who will use this link.

Again, this will be modifying the v4 default master page with SharePoint Designer

  • Locate this line:

SharePoint:ClusteredSPLinkButton id="idNavLinkViewAllV4"

  • Next, add the following tag above this line to add security controls:

[Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb"]
Close element with the following tag:

(Note: Remember to change the [ and ] to opening and closing html tags)

Hiding SharePoint 2010 Ribbon

One of the very first ways my organization wanted to customize their SharePoint 2010 look and feel was to hide the new Ribbon for normal site visitors. Without at least contribute permissions the ribbon provides almost no functionality so why confuse the users by even letting them click on it.

Through many days of trial and error I found this to be the best method to hide the Ribbon without breaking your SharePoint 2010 scroll bar:

Open SharePoint Designer 2010 (download from Microsoft)
Go to the Site Collection you wish to modify and AFTER making a backup copy of the v4 master page, use the following steps to modify your site's master page:
  • Locate this line:
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
  • Modify this to:
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
  • Find the END of the “s4-ribbonrow” </div>
     tag and add these controls right after it:

<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">
<script type="text/javascript">
document.getElementById("s4-ribbonrow").style.display = "block";

  • Save the new master page, publish as new major version, and approve if source control is enabled.
This will use security trimming to hide the SharePoint 2010 Ribbon for any user that does not have enough permissions to AddAndCustomizePages

(Note --- I am still working on a clean way of displaying the Sign In portion of the banner for all users, until then my workaround is to add a separate manually created Sign In link to the quick launch bar on the left)

Suggestions and improvements are always greatly appreciated so feel free to post other methods...

Welcome to

This blog is brand new so stay tuned for updates!

Like many of you I've found searching for solutions to SharePoint problems on the internet to be a frustrating process full of half answers or entirely incorrect solutions to difficult problems.

Instead of continuing to complain about lack of good information, I've decided to play a small part in adding to the community by posting general information and the fixes to issues I have run into while deploying SharePoint 2007 and SharePoint 2010 web sites to several large organizations.