Permanently Removing the Recent Node from Quick Launch for SharePoint 2013
The following updates have been made to this article since it’s publication:
[Update 9/7/2016] – The method suggested by Håkan Nilsson only works with Publishing Enabled so that you can access the navigation through site setting. You cannot audience the navigation on any site without Publishing Enabled.
A reader Håkan Nilsson has suggested a simple solution to permanently hide the Recent node.
- Create an empty SharePoint Group
- In Site Settings -> Look and Feel -> Navigation, Edit the Recent node in Current Navigation
- Add your blank group to the Audience field.
this method is super easy for an end user to implement without deploying a sandbox solution below. But feel free to continue reading if you are interested in that method.
Yesterday I was tasked to remove the “Recent” node from the quick launch for a customers SharePoint online site. I’ve decided to release the solution in hopes that other people could take advantage of it. The picture below will show you the “Recent” node.
This node was undesired by the user because they wanted to have control over the quick launch navigation. They mentioned that every time they add a new list or library then new items will be added under the “Recent” node. When they go and delete it from the Navigation section in Look & Feel, it will just re-appear when they create a new list or library. Basically they wanted it gone.
I paired this with the jQuery as suggested in the article to hide the “Recent” node. Except I made one modification to it you can see below. I’ve added the id #sideBox to have this only search in the Quick Launch. I explain more about why I remove and hide it in the next section.
The entire solution & the pre-built .wsp can be downloaded from CodePlex – http://rr.codeplex.com
The sandbox solution is composed of two components:
- HideRecent.js – jQuery code to hide the “Recent” node
Why remove and hide?
Since the RemoveRecent.js runs client side there is a case where you may see the “Recent” node. For example you just finished creating a new list and the page refresh. The code to remove the node in RemoveRecent.js is called asynchronously. The list or library is removed from the back end but on the client side is not updated. This could be handled with a refresh but that causes a double refresh once you create a new list and there is a delay between the refreshes. I felt that this created a bad user experience. The answer to that was to also hide the node using HideRecent.js
Hope this may be useful to some of you out there.