I create programmatically in CSOM/PNP a new subsite. This subsite do not needs to enhirit the quick launch navigation of the parent. I would like to set the navigation to structural navigation. And do not want to show subsites and pages. How to do that?
I did it already in powershell but cannot convert it to CSOM. Here is the powershell code:
$web = get-spweb 'http://mycompany.com' # enable structural navigation for the global/quick launch navigation $navSetting = new-object Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings($web) $navSetting.CurrentNavigation.Source=[Microsoft.SharePoint.Publishing.Navigation.StandardNavigationSource]::PortalProvider $navSetting.Update() # disable including pages/subsites for the quick launch navigation $SPPubWeb.Navigation.CurrentIncludeSubSites = $false $SPPubWeb.Navigation.CurrentIncludePages = $false $SPPubWeb.Update() $web.Dispose()