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.
I find it annoying that recently changes pages are listed there. Users shouldn’t see maintenance changes. Documents yes, pages no.
Thank you so much! I used the Edit HTML on my page and it worked brilliantly. Thankyouthankyouthankyou!
[…] hide recently modified quick launch” will reveal several well-documented solutions such as this or this, which offer useful variations on the theme of using CSS to achieve this goal, either by […]
Doesn’t work – tried the html edit one, didn’t hide it.
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.
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?
hey did u got any work around for this, me too its getting the same error .ExternalClass933379FCFF2F4832B7D9E309CBAB5C9D
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.
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.
Thank you very much 🙂
This method works only until I hit Save & Close. After that the “Recently Modified” menu comes back. When I go in to try to fix it, the code is still there but with an added part:
.ExternalClassA6AACD3ABA17429E9D5B27C013DEFA5E .s4-recentchanges {
DISPLAY: none
}
Why does this happen and how can I fix it?
Mike, I’m only getting this to work if I add a “Content Editor” web part then change the HTML of that item within the page. Changing the page HTML only works temporarily until hitting save (same as you)
Yes, this works…Add a content editor to that page (insert->webpart->media and conent ->content editor->add), the content editor appears on the top of the page. Use the drop down to the far right of the content editor bar to select “edit web part”, then click “click here to add new content”.
At this point, follow the instructions above (Format text ->HTML->edit html source) and then paste the code. Click ok and kaboom, its gone. Unfortunately you have to do that from page to page 😦
I was getting the same error. Your fix worked like a champ! Thanks so much.
Took me way longer than I would like to admit to figure out how to edit the HTML of the content editor and not the main page. This helped a lot. Thanks!
An outstanding share! I’ve just forwarded this onto a friend who has been doing a little research on this.
And he actually ordered me dinner simply because
I found it for him… lol. So let me reword this….
Thank YOU for the meal!! But yeah, thanks for
spending the time to talk about this subject here on your web site.
This worked great! thank you so much for sharing.
Thanks in favor of sharing such a goopd thinking, post is nice, thats why i have
read it fully