Open sitwalkstand opened 5 years ago
I can confirm this behavior. Not what I was expecting. I was hoping this would emulate using the GUI when clicking New -> Subsite. Using this wizard creates a subsite and adds an entry into the top navigation. This doesn't appear to do the last part. Would be nice if this would also apply an entry to root site collection top navigation as well.
Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.Reporting an Issue or Missing Feature
When I run the following command the Parent site navigation is not applied to the new sub site that is created:
New-PnPWeb -Title "Project A Web" -Url projectA -Description "Information about Project A" -Locale 1033 -Template "STS#0" -InheritNavigation
Expected behavior
I am running this in a sub site and am expecting it to use the parent's global navigation. This is the parent's navigation bar:
Actual behavior
This is what is displayed after running the New-PnPWeb command:
If I go to the Site Settings -> Navigation it shows the correct option selected:
And if I click the "Ok" button on the Navigation settings it then correctly applies the top-level navigation:
I am attempting to use the New-PnPWeb command as part of an automatic site provisioning process and am hoping to avoid the manual steps of navigation the UI and having to click "Ok" to apply the global navigation.
Steps to reproduce behavior
New-PnPWeb -Title "Project A Web" -Url projectA -Description "Information about Project A" -Locale 1033 -Template "STS#0" -InheritNavigation
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
) 3.2.1810.0How did you install the PnP-PowerShell Cmdlets?