How to Enable Mega Menu in SharePoint Online?

Requirement: Enable the mega menu in SharePoint Online

How to Enable Mega Menu in SharePoint Online?

In SharePoint Online communication sites, you can enable the mega menu to improve user experience in the site navigation. To enable the mega menu, follow these steps:

  • Navigate to your SharePoint Online site >> Click on Settings gear >> Click on the “Change the look” link. 
  • Select “Navigation” >> Choose “Mega Menu” 
    sharepoint online mega menu
  • Click on the Save button.

SharePoint Online: Enable Mega Menu using PowerShell

Run this PowerShell script to enable mega menu for a site collection:

Import-Module Microsoft.Online.SharePoint.Powershell -DisableNameChecking

#Parameters
$SiteURL = "https://crescent.sharepoint.com"

#Setup Credentials to connect
$Cred = Get-Credential
 
#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)

#Get the Web
$Web = $Ctx.Web
$Ctx.Load($Web)
$ctx.ExecuteQuery()

#Enable Megamenu experience
$Web.MegaMenuEnabled = $True
$Web.Update()
$Ctx.ExecuteQuery()

To disable Mega menu, just set the flat “MegaMenuEnabled” to $False! You can also turn-ON mega menu using PnP PowerShell:

#Parameters
$SiteURL = "https://crescent.sharepoint.com"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -UseWebLogin

#Enable Mega menu
$Web = Get-PnPWeb
$Web.MegaMenuEnabled = $True
$Web.Update()
Invoke-PnPQuery

Here is the SharePoint Online mega menu in action!

how to enable mega menu in sharepoint online

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply