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.

[sourcecode language=”css”]



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”

[sourcecode language=”csharp”]


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!


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.

About Karsten Schneider 312 Articles
Consultant for Microsoft 365 Applications with a strong focus in Teams, SharePoint Online, OneDrive for Business as well as PowerPlatform with PowerApps, Flow and PowerBI. I provide Workshops for Governance & Security in Office 365 and Development of Solutions in the area of Collaboration and Teamwork based on Microsoft 365 and Azure Cloud Solutions. In his free time he tries to collect tipps and worthy experience in this blog.


Leave a Reply

Your email address will not be published.