SOLVED

Same navigation for several hub sites

Brass Contributor

Hey,

 

we are currently working on a concept to move from our Classic SharePoint Online to the more modern Modern UI in combination with MS Teams.

 

Currently we use Managed Meta-Data for our top navigation. The order of the individual links is therefore the same on every site collection.

 

I have now created 2 hubsites for testing and added my links there for testing purposes. My problem is that the current hub site is always listed as the first link.

 

So my question is, is it possible to remove or move the link within the TopNavigation with a setting or PowerShell?

 

Thanks a lot!

wit4r7

 

3 Replies

Hi,

Yes, you can remove the default link of current hub site in the navigation. Please follow the below steps - 

Click on the Gear icon in the top right of the ribbon and navigate to Hub Site Settings and then click on the toggle option from "Shown in Navigation" to "Hidden in Navigation" and then Save it. This should remove the link of your current default hub site in the hub site navigation.

 

To move the link to a different order in the navigation, you could follow the above steps and then click on the edit option in the navigation to add the current hub site link in any order as per your requirement. Please see the attached screenshot for the configuration.

Hub Navigation Configuration.png

 

@wit4r7 

I hope this is helpful, please like it or mark it as a solution if it answers your query.

Thanks.

Thanks, that helps a lot!

Is there a PowerShell command for doing the same?
best response confirmed by wit4r7 (Brass Contributor)
Solution

Hi @wit4r7,

 

Yes, you could utilize Set-PnPHubSite cmdlet from SharePoint PnP PowerShell to toggle the Show or Hide Hub Name in Navigation parameter.

Example - Set-PnPHubSite -Identity <YourHubSite> -HideNameInNavigation:$true
Set $true in the above command to Hide your default Hub Site link in the Hub Navigation and,

Set $false in the above command to Show your default Hub Site link in the Hub Navigation

 

Please note that when you run the above command from PowerShell, the changes may not be reflecting immediately and you may have to wait for 30-60 minutes for the changes to reflect in your Hub Navigation. Therefore, you may have to plan accordingly when you make changes via PowerShell.

 

Please refer this link for the documentation - https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnphubsite?view=sharepoint-ps

 

I hope this is helpful, please like it or mark it as a solution if it answers your query.

Thanks.

1 best response

Accepted Solutions
best response confirmed by wit4r7 (Brass Contributor)
Solution

Hi @wit4r7,

 

Yes, you could utilize Set-PnPHubSite cmdlet from SharePoint PnP PowerShell to toggle the Show or Hide Hub Name in Navigation parameter.

Example - Set-PnPHubSite -Identity <YourHubSite> -HideNameInNavigation:$true
Set $true in the above command to Hide your default Hub Site link in the Hub Navigation and,

Set $false in the above command to Show your default Hub Site link in the Hub Navigation

 

Please note that when you run the above command from PowerShell, the changes may not be reflecting immediately and you may have to wait for 30-60 minutes for the changes to reflect in your Hub Navigation. Therefore, you may have to plan accordingly when you make changes via PowerShell.

 

Please refer this link for the documentation - https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnphubsite?view=sharepoint-ps

 

I hope this is helpful, please like it or mark it as a solution if it answers your query.

Thanks.

View solution in original post