Sharepoint - How to hide recent in the navigation
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;
}
}
You can manually delete the header from:
Site Settings-> Look and Feel -> Navigation
I have an out of the box solution.
- *Settings -> Site contents
- *Site permissions
- *Create Group
- Make a new group with no permissions.
- Delete all users from the group.
- *Settings -> Site contents
- *Navigation
- Select the "Recent" heading
- *Edit
- Set Audience = the group from step 4
- *OK
- *OK
Now only members of a group, with no members, are able to see the "Recent" heading.