RSS

Hiding the Recently Modified Section in SharePoint 2010

05 Jul
Applies To: SharePoint 2010, CSS

I recently added a Wiki Pages Library to a site for some end users and they really like it. However, they had a seemingly straight forward request to hide the Recently Modified section that was showing up above the Quick Launch:

This may come up as a requirement when using some of the default templates that automatically include a Site Pages library or if a user adds a new page and is prompted to create the Site Pages library automatically.

I assumed there was a setting somewhere either for the library or the site in order to turn off this “feature”. Nope. Somebody decided that this was not only a feature everyone would want, but it was so great they put it in the left actions content place holder (PlaceHolderLeftActions) of the master page – which puts it on top of the quick launch.

Some quick searching turned up “solutions” that suggested setting the contentplaceholder’s visible property to false within the master page. This works; however, it also hides anything that uses that contentplaceholder such as some of the Blog tools. This makes it a very poor candidate for a farm wide branding solution.

The other option is to use some CSS (cascading style sheets). If you’re pushing this as part of a branding solution, just add this to one of your style sheets:

.s4-recentchanges{
	display:none;
}

That’s it. Microsoft provided a very handy class just for this section and some quick use of the CSS Display property takes care of it.

So what if this is just a one off thing – You aren’t currently using any custom branding or just want it to affect one site? For a single site you can use SharePoint Designer 2010 to open the master page (v4.master – choose edit in advanced mode). Then somewhere on the page add the following:

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

If you just want to apply it page by page, you can put the style directly in the HTML of the page. Since this is a Wiki page, choose to edit the page (Under the Page Ribbon assuming you have the rights). Click anywhere on the page and choose the HTML drop down and pick Edit HTML Source:

Somewhere on the page add the following:

<style>
.s4-recentchanges{
	display:none;
}
</style>
You can also do this in a content editor web part using the same Edit HTML Source option.

If you don’t hide this thing, I would suggest editing the master page to at least move that contentplaceholder below the quicklaunch so your navigation doesn’t get all wonky or at least displaced by a relatively unused feature.

About these ads
 

Tags: , , , , , , , , , , , ,

11 Responses to Hiding the Recently Modified Section in SharePoint 2010

  1. creativesptechnology

    July 18, 2012 at 9:18 am

    I find it annoying that recently changes pages are listed there. Users shouldn’t see maintenance changes. Documents yes, pages no.

     
  2. Jody Harrell

    September 27, 2012 at 7:47 pm

    Thank you so much! I used the Edit HTML on my page and it worked brilliantly. Thankyouthankyouthankyou!

     
  3. danny

    January 31, 2013 at 5:28 am

    Doesn’t work – tried the html edit one, didn’t hide it.

     
    • theChrisKent

      February 4, 2013 at 11:09 am

      danny, sorry to hear that. I’ve used this method several times without issue. Could you provide a little more detail about the issues you’re having? Check the HTML source after editing and saving the page. SharePoint reformats these sections and if you had any typos or anything else it didn’t like it may have removed and or changed your style section.

       
      • Will van Geest

        February 8, 2013 at 4:37 am

        The Edit HTML trick doesn’t work for me either. (I don’t have authorization to change the master page.) When I close the HTML Source popup I get a warning about the HTML code that may have been changed. The resulting HTML code is (with Firefox’s View Page Source):

        .ExternalClass933379FCFF2F4832B7D9E309CBAB5C9D .s4-recentchanges
        {display:none;}

        Is there anything I can do to get this very useful method to work?

         
        • subhash

          February 13, 2013 at 7:08 am

          hey did u got any work around for this, me too its getting the same error .ExternalClass933379FCFF2F4832B7D9E309CBAB5C9D

           
  4. Phil H

    February 14, 2013 at 11:40 am

    As a workaround to the ExternalClass problem, I would try the following.

    Add the CSS that is mentioned above to a file with extension css (e.g. hiderecent.css). Don’t include the tags in the css file. Add this css file to your site (a good spot would be the SiteAssets doc library.)

    Then, in the master page, add the link tag instead of the style tag, something along the following lines, replacing the path appropriately.

     
  5. Marie

    March 13, 2013 at 2:31 pm

    I am not able to work in SP Designer and so far, none of the examples above are working for me. I have tried to add the code to the Pages, add the link to the CSS to the pages and also to the SitePage main page. But everytime i save, it either changes the code or deletes it.

     
  6. dildarm

    April 23, 2013 at 8:09 am

    Thank you very much :)

     
  7. Libby

    May 7, 2013 at 12:30 pm

    It’s perfect time to make some plans for the future and it’s time to
    be happy. I have read this post and if I could I
    wish to suggest you some interesting things or advice.
    Maybe you can write next articles referring to this
    article. I wish to read more things about it!

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: