Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation

Introduction

 
We will utilize the Managed Metadata Service to create a Term Store and use these Term Stores to set up global navigation for SharePoint 2016 Sites.
 
This global navigation will display as Mega menus. Here are my site pictures before and after making the changes.
 
Before
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation
 
After
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation
 

Steps

 
Go to Site Settings, under Site Administration, click Term store management. Select your Site Collection and create New Term Set. I named it as MegaMenu Navigation.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation
 
Under Megamenu Navigation, I created more terms as required.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation
 
Note
If you decide to change the order of the terms, you can only move terms to different parent terms or go to Custom Sort and modify clicking Use custom sort order.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
I will not custom sort for this tutorial.
 
Now, go to Site Settings, under Look and Feel, click Navigation. Set Global Navigation to Managed Navigation.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 

Under Managed Navigation

 
In the Term Set section click MegaMenu Navigation. It is the term that we created.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
Click ok and you will see all the terms we created earlier under Global Navigation.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
Now it is up to you to style your Global Navigation as you wish.
 
Here is a simple way to style it. I will create a Custom CSS file and associate it with the default master page.
 
First let’s create a custom css file and upload it inside Style Library of the root site.
 
Here is the CSS code,
  1. #DeltaTopNavigation ul.ms - core - listMenu - root {  
  2.         list - style - type: none;  
  3.         margin0;  
  4.         padding0;  
  5.         background - color#333;  
  6. }  
  7. # DeltaTopNavigation ul.ms - core - listMenu - root > li {  
  8.             floatleft;  
  9.         }  
  10.         #DeltaTopNavigation ul.ms - core - listMenu - root li a {  
  11.             displayinline - block;  
  12.             colorwhite;  
  13.             text - align: center;  
  14.             padding14 px 16 px;  
  15.             text - decoration: none;  
  16.         }  
  17.         #DeltaTopNavigation ul.ms - core - listMenu - root li a: hover {  
  18.             background - colorred;  
  19.         }  
  20.         li.dynamic - children ul {  
  21.                 background - color#555;  
  22.             }  
  23.          ul.dynamic{  
  24.             width:200px;  
  25.          }  
I named the css file as megaMenuStyle.css and put it under MegaMenu_MasterPage folder inside Style Library.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
Open your site using SharePoint Designer. Go to All Files, _catalogs, masterpage. Copy seattle.master and paste it in the same folder. I named is as MegaMenu.master.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
Right click and edit this master page. Before </head> tag insert your CSS link,
  1. <SharePoint:CssRegistration Name="<% $SPUrl:~SiteCollection/Style Library/MegaMenu_MasterPage/megaMenuStyle.css%>" runat="server"></SharePoint:CssRegistration>  
Save and publish your master page.
 
Now we need to apply our newly created master page to the SharePoint sites. So go to the site settings, under look and feel click Master page.
 
Specify your newly created master page as default master page and click Ok.
 
Mega-Menu Global Navigation In SharePoint 2016 Using Managed Metadata Navigation 
 
I hope you found this useful. 
 
Here are some useful references that I used,
  • https://www.c-sharpcorner.com/article/create-a-responsive-navigation-menu-using-managed-metadata-navigation-in-sharepo/
  • https://www.w3schools.com/howto/howto_css_mega_menu.asp