Remove “Recently Modified” from Quick Launch in SharePoint 2010

Remove “Recently Modified” from Quick Launch in SharePoint 2010

While messing around with SharePoint 2010 pages today, I remembered I wanted to find a way to remove the “Recently Modified” section from the Quick Launch area.  This was a very easy fix, as explained by John Dandison.

Add a Content Editor Web Part to any section of the page and put this in the HTML:

<style>
.s4-recentchanges
{
DISPLAY:none;
}
</style>

Now THAT was easy!  Sure you can also do this in SPD, but for me this was a LOT easier for a page here and there.  If I wanted to create a page template going forward, just modify the master page for this item in SPD by adding the DISPLAY:none; to the .s4-recentchanges CSS element!

9 thoughts on “Remove “Recently Modified” from Quick Launch in SharePoint 2010

  1. This is a good solution – both the webpart and the inline Css – as well as the SPD method on the master pages…. Sadly, I have a non-technical client on a remote site, and I don’t have access to their SharePoint Servers, so they are installing our solution via a .wsp file.

    So it would be really useful if I could build this into some .net code as part of my application ….
    any suggestions?

    1. I would think you could add these items to your solution using a Module, mapped folders and a feature receiver. In the Module, name the file using the “.master” extension, and style it any way you like. I usually just copy the code from v4.master and then mark up the page with whatever customization I need. In here, you could add the CSS for hiding the Recently Modified section. Then, in the Elements.xml file for the Module, inside the Module element, set the Url attribute to wherever the file will live, and make sure the following children are included:

      
          
              
              
          
      
      

      Also any images or custom CSS pertaining to the solution should go in mapped folders in the solution before deploying. Make sure the line in your masterpage that points to the custom CSS file has the right href for where it’s going to live permanently on the server, such as ~/layouts/1033/styles/custom.css. Finally, you’ll want to ensure there’s a Feature included and in the FeatureActivated method set the masterpage accordingly:

      SPWeb currentsite = properties.Feature.Parent as SPWeb;
      Uri masteruri = new Uri(currentsite.Url + "/_catalogs/masterpage/custom.master");
      currentsite.MasterUrl = masteruri.AbsolutePath;
      currentsite.Update();
      

      Something like this might help, hopefully. Let me know if it works or if I missed the point altogether.

  2. Make sure you create a <style> element and put it inside there first:
    <style>
    .s4-recentchanges
    {
    DISPLAY:none;
    }
    </style>

    Also make sure your page/site is in Edit mode, and the CEWP you’re putting this into is also in Edit mode. With the CEWP selected, locate the Markup section in the ribbon and click the HTML button, then Edit HTML Source. Make sure this code is added in here, then save your way out.

    1. Hi,

      I tried this 3 times. When I click OK in the Edit HTML dialogue box, the Recently Modified portion of the Quick Launch. However, it only works while the page is still in the Edit mode. When I click Save and Close in the ribbon, the Recently Modified shows up again.

      Is there a particular order in saving or additional commands that will make this permanent?

      Will be very grateful for your reply. Thanks.

      1. Make sure you create a <style> element and put it inside there first:

        <style>
        .s4-recentchanges
        {
        DISPLAY:none;
        }
        </style>

        While in page is in edit mode, make sure the CEWP you’re putting this into is also in Edit mode. With the CEWP selected, locate the Markup section in the ribbon and click the HTML button, then Edit HTML Source. Make sure this code is added in here, then save your way out. Let me know if this helps.

Comments are closed.

Comments are closed.