SharePoint 2010 Hide the all site content from site actions menu

If you do not want to show the all site content link to your end users or simply hide it, you can use a simple solution and a global solution. You have to separate where you want to hide this link.

The simple solution

The simple solution is to insert a content editor webpart. In this CEWP you just insert a few lines of css code and make this webpart hidden.



.s4-specialNavLinkList
{
display:none;
}


This css code hides the link to all site content. But if the user just clicks on “Site Actions” he will see the same link in the menu. So maybe it won’t be enough for you!? Another point is that you have to do this on each page where the link should not be displayed.

The global solution

If you want to hide the all site content link from all sites or a number of sites, you’ll have to edit the masterpage. You can also edit the global css file. But in this case we are looking at the option by using the master page.

If you create a copy of your master page you can offer two solutions: one masterpage with and one without the link. But if there are other changes you have to edit two master pages.

At these lines of code you have to add the attribut “Visible = false”



<sharepoint:menuitemtemplate runat="server" id="MenuItem_ViewAllSiteContents"
Text="<%$Resources:wss,quiklnch_allcontent%>"
Description="< %$Resources:wss,siteactions_allcontentdescription%>"
ImageUrl="/_layouts/images/allcontent32.png"
MenuGroupId="300"
Sequence="302"
UseShortId="true"
ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
PermissionsString="ViewFormPages"
PermissionMode="Any"
<!-- Add the visible Attribut -->
Visible="false" />


That will hide the link from all sites which are using your master page. You can also use the Security Trimm Control of SharePoint. A good description can be found here.

The Lack of the solutions above

Both solutions does not help if the user opens the link manual. That means he types into his browser http://yourserver/sites/yoursitecollection/_layouts/viewlsts.aspx and click on enter. So if you have a solution for that case, i would like to hear!

..:: I LIKE SHAREPOINT ::..

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

Karsten Pohnke About Karsten Pohnke
He is Consultant for SharePoint Solutions for collaboration, communication and business processes. He provides his customers applications based on standard features as well as development or combining the power of several microsoft tools like Dynamics CRM. In his free time he tries to collect tipps and worthy experience in this blog.

3 comments on “SharePoint 2010 Hide the all site content from site actions menu

Submit comment

Allowed HTML tags: <a href="http://google.com">google</a> <strong>bold</strong> <em>emphasized</em> <code>code</code> <blockquote>
quote
</blockquote>

Please fill in the captcha: * Time limit is exhausted. Please reload CAPTCHA.