locked
Hide “recent” in Quick Launch\Left Nav in SharePoint 2013 RRS feed

  • Question

  • Hi

    Is it possible to remove/hide the "recent" from displaying within the Quiick Launch bar? 

    I'm able to remove 'Edit Links' with:

    <style>
    .ms-displayInlineBlock{
    display: none;
    }
    < /style>


    • Edited by superOWLS Wednesday, February 13, 2013 1:58 PM
    Wednesday, February 13, 2013 1:46 PM

All replies

  • Hi,

    there is no OOB way how to remove that navigation element. However you can create your own custom feature, that removes 'recent' navigation node programmatically (see QuickLaunch property of SPNavigation class and its SPNavigationNode: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.quicklaunch.aspx).

    The other way is to use CSS/jQuery to just hide that. You can try to set property 'display:none' to first 'SPAN' element of class named 'static' or use jQuery to select element containing text 'Recent'.

    I hope you'll succeed.

    Wednesday, March 13, 2013 8:27 AM
  • Use jQuery.

    jQuery(document).ready(function() {
    	jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
    });



    • Edited by Scott Tarnell Wednesday, May 29, 2013 7:01 PM moved to code block
    Wednesday, May 29, 2013 6:43 PM
  • I am new to SharePoint 2013.  Which file will this snippet go in?   Thanks IA
    Wednesday, September 25, 2013 2:25 PM
  • Snippets can be added to "Content Editor" web part which is found in the Media & Content Web Part category.

    eric

    • Proposed as answer by eric Schimansky Wednesday, September 25, 2013 2:46 PM
    Wednesday, September 25, 2013 2:46 PM
  • Im pretty certain you can just use the edit links link and delete the recent section? I may have to go verify but I thought you could.
    Wednesday, September 25, 2013 3:33 PM
  • True, the issue is however; every time something new is added it populates the recent section. 
    Wednesday, October 2, 2013 1:34 PM
  • Are you suggesting to put this jQuery in a Snippet, as requested by IA? 

    This doesn't work in SharePoint in 2013

    Wednesday, October 2, 2013 1:50 PM
  • You are correct. You can add the following two lines after to the Seattle.master after the <SharePoint:CustomJSUrl runat="server" /> code (using whatever version of jQuery you want):

    <SharePoint:ScriptLink language="javascript" Defer="true" runat="server" Localizable="true" Name="jquery-1.8.3.min.js"/>

    <SharePoint:ScriptLink language="javascript" Defer="true" runat="server" Localizable="true" Name="custom.js"/>

    Where

    jQuery(document).ready(function() {
    	jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
    });

    is in custom.js but there is a nasty little bug. I use CSS to highlight the the current item in the QUICKLAUNCH :

    .ms-core-listMenu-verticalBox a.selected .menu-item-text {

    color: #21689c;
    font-weight: bold;
    }

    When the users clicks on a SubSite the first link, which is the Home Page of that SubSite and therefore the selected page, should be bold and blue but the "Recent" is apparently, even though its hidden, still considered the "selected" item so the highlight does not appear on the page until the user clicks another item. No way around this it seems so I'm having to delete all the Home Page links. . .


    Kathryn Birstein, Senior SharePoint Architect

    Tuesday, November 19, 2013 2:55 AM
  • It's easier than any of the steps above.

    1. Create a SharePoint group called "Hide Me"
    2. Remove yourself from the group
    3. Go to Site Settings --> Navigation
    4. Edit "Recent" and set the "Audiance" to the empty group.

    Now only people in the "Hide Me" group will see the "Recent" links which is nobody!
    If you forget to remove yourself, only you will see "Recent" in the quicklaunch.


    Robert

    Thursday, July 28, 2016 6:45 PM