I am unable to hide/show pages & subsites from the navigation in SharePoint Server 2013 (15.0.4841.1000 July 2016 CU).
I have SharePoint Server Publishing Infrastructure enabled at the site collection level and SharePoint Server Publishing enabled at the site level.
I want to change the navigation for a site, this is what I do:
Noodling around I have found:
So, it looks like on the navigation settings page it will apply any changes except Hide/Show changes. I know that as a hack I could uncheck "Show subsites" and add in all of the links manually, but I would rather have SharePoint take care of the navigation automatically. But I still want the ability to tweak that navigation. Has anyone else run into this? Any ideas on how to fix this?
Thanks!
We have been suffering from this bug also, we have June 2016 CU installed. Finally found some comment from Microsoft. Stefan Goßner commented "The navigation issue was introduced with June CU – a fix is currently planned to be released for October CU." on comments section on page https://blogs.technet.microsoft.com/stefan_gossner/2016/08/09/august-2016-cu-for-sharepoint-2013-product-family-is-available-for-download/
UPDATE : October CU is available and this navigation bug has been fixed: https://blogs.technet.microsoft.com/stefan_gossner/2016/10/11/october-2016-cu-for-sharepoint-2013-product-family-is-available-for-download/
I have installed October 2016 CU on couple of farms and it fixed navigation show/hide bug at least on our environments.
So I found another person with a similar problem here: https://social.technet.microsoft.com/Forums/en-US/b2bac40d-ed31-4ec5-842b-260275ae5e6c/unable-to-hide-one-subsite-in-global-navigation-menu?forum=sharepointadmin
I was able to fix my navigation with powershell:
Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue
$web = Get-SPWeb http://SubSiteUrl...
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pageTitlesToShow = @("Test Page 1","Test Page 2")
$pages = $web.Lists["pages"]
foreach ($item in $pages.Items) {
if (-not $pageTitlesToShow.Contains($item.Title)){
$item.Title
$item.UniqueId
$publishingWeb.Navigation.ExcludeFromNavigation($false,$item.UniqueId);
} }
$publishingWeb.Update()
$web.Close()
$web.Dispose()
However, users still cannot update the navigation through the GUI. Is there anyone else out there having problems with the navigation? Site Owners should be able to manage this on their own.
Figured it out. Hope this helps someone out there.
This script shows (un-hides) a single page
$web = Get-SPWeb http://subsiteURL
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pageTitlesToShow = @("Page Title") # this needs to be page title
$pages = $web.Lists["pages"]
foreach ($item in $pages.Items)
{
if ($pageTitlesToShow.Contains($item.Title)){
$item.Title
$item.UniqueId
$publishingWeb.Navigation.IncludeInNavigation($false,$item.UniqueId);
}
}
$publishingWeb.Update()
$web.Close()
$web.Dispose()
Go into navigation and hide the original navigation link. Insert a new link, this will not show the subsites under subsites.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.