SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In SP2013 you have the recent entry in the navigation. Is there an easy way to automatically hide/remove this entry?

share|improve this question
up vote 9 down vote accepted

Did some additional research and found the answer myself.

var title = SPUtility.GetLocalizedString("$Resources:core,category_Recent", null, web.Language);
SPNavigationNodeCollection nodes = web.Navigation.QuickLaunch;
foreach (SPNavigationNode node in nodes)
{
  if (node.Title.Equals(title))
  {
    node.Delete();
    break;
  }
}
share|improve this answer
1  
Where did you put this code? I put it in a Feature Event Receiver in the FeatureActivated event, & it didn't work :( – Markus Aug 4 '15 at 15:22

You can manually delete the header from:

Site Settings-> Look and Feel -> Navigation

share|improve this answer
    
I am creating a webtemplate based on a teamsite. Do you know how this can be done by code? – Remko Mar 7 '13 at 13:20
    
What is the result you are looking for? Should the navigation be inherited from the parent site? – Vardhaman Deshpande Mar 7 '13 at 14:22
    
I already found and posted the answer I was looking for. Tnx for helping – Remko Mar 14 '13 at 9:59

I have an out of the box solution.

  1. *Settings -> Site contents
  2. *Site permissions
  3. *Create Group
  4. Make a new group with no permissions.
  5. Delete all users from the group.
  6. *Settings -> Site contents
  7. *Navigation
  8. Select the "Recent" heading
  9. *Edit
  10. Set Audience = the group from step 4
  11. *OK
  12. *OK

Now only members of a group, with no members, are able to see the "Recent" heading.

share|improve this answer

I decided as follows: Added the css code on the page that did not want to display the "Recent" menu:

div#zz12_V4QuickLaunchMenu ul#zz13_RootAspMenu li.static span.static span.additional-background{
display:none;
}
share|improve this answer
  1. Site Settings -> Quick Launch Select the Edit icon near Recent
  2. Copy any valid url into the empty URL box (Recent item does not show a URL)
  3. Click Delete (with an empty URL box, it would have given an error message)
  4. Confirm deletion

It works in SharePoint 2013, not sure about the earlier versions

share|improve this answer

With Sharepoint Online (Office 365) you can delete the Recent from the menu by doing the following:

  1. Select "Edit Links" at the bottom left of menu
  2. Click "X" next to Recent" to delete it and save

NOTE: You'll need to recreate the menu links under "Recent" if you follow these steps. Under each app you'll need to toggle the on/off radio button for "Display this list on the Quick Launch?" in the General Settings.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.