Description

The disabled navigation option allow you to disable certain level horizontal navigation link.

Examples

CSS Classes

This table contains class to disable navigation menu link.

All these options can be set via following classes:

Classes Description
.disabled To disabled vertical navigation menu link, you need to add .disabled class in navigation <li> tag. Refer HTML markup line no 12.

HTML Markup

This section contains HTML Markup to create vertical bordered navigation. It define where to add css classes to make vertical bordered navigation.

  • Line no 16, 22 & 54: Contain the .disabled class, Line 16 shows to disabled parent menu item and Line 22 & 54 shows disabled child menu item.
          
            <!DOCTYPE html>
            <html lang="en">
            <head></head>
            <body data-open="click" data-menu="horizontal-menu" class="horizontal-layout horizontal-menu 1-column menu-expanded">

            <!-- navbar-static-top-->
            <nav role="navigation" class="header-navbar navbar-expand-sm navbar navbar-with-menu navbar-static-top navbar-dark navbar-shadow navbar-border">
            ...
            </nav>

            <!-- START  Horizontal navigation -->
            <div role="navigation" data-menu="menu-wrapper" class="header-navbar navbar-expand-sm menu-icon-right navbar navbar-horizontal navbar-dark navbar-shadow border-grey border-darken-2">
            <!-- Horizontal menu content-->
            <div data-menu="menu-container" class="navbar-container">
            <ul id="main-menu-navigation" data-menu="menu-navigation" class="nav navbar-nav">
            <li class="nav-item"><a href="index.html" class="nav-link disabled"><i class="la la-home"></i><span>Dashboard</span></a></li>
            <li data-menu="dropdown" class="dropdown nav-item"><a href="#" data-toggle="dropdown" class="dropdown-toggle nav-link"><i class="la la-tv"></i><span>My Menu</span></a>
            <ul class="dropdown-menu">
            <li class=" navigation-header"><span>Main</span></li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item disabled">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            <li data-menu="dropdown-submenu" class="dropdown dropdown-submenu"><a href="#" data-toggle="dropdown" class="dropdown-item dropdown-toggle">Second level with child</a>
            <ul class="dropdown-menu">
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Third level</a>
            </li>
            <li data-menu="dropdown-submenu" class="dropdown dropdown-submenu"><a href="#" data-toggle="dropdown" class="dropdown-item dropdown-toggle">Third level with child</a>
            <ul class="dropdown-menu">
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item disabled">Fourth level</a>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Fourth level</a>
            </li>
            </ul>
            </li>
            </ul>
            </li>
            <li data-menu=""><a href="#" data-toggle="dropdown" class="dropdown-item">Second level</a>
            </li>
            </ul>
            </li>
            </ul>
            </div>
            <!-- /horizontal menu content-->
            </div>
            <!-- END  Horizontal navigation -->

            <!-- BEGIN Content-->
            <div class="content app-content">
            <div class="content-wrapper">
            <!-- content header-->
            <div class="content-header row">
            ...
            </div>
            <!-- content header-->

            <!-- content body-->
            <div class="content-body">
            ...
            </div>
            <!-- content body-->

            </div>
            </div>
            <!-- END Content-->

            <!-- START FOOTER DARK-->
            <footer class="footer footer-dark">
            ...
            </footer>
            <!-- START FOOTER DARK-->

            </body>
            </html>
          
        

PUG Configuration

Modern Admin use PUG as template engine to generate pages and whole template quickly using node js, for getting start with PUG usage & template generating process please refer template documentation.

Menu JSON Configurations
Options Description
classlist Is the name of menu object, you can add any classes realted to that navigation link. To disable add disabled.
PUG Code

You need to add navigation disabled link options to menu JSON object, please read the documentation to customize the menu using PUG.

  • Line no 18, 22 & 28: Contain disabled navigation link JSON configurations options.

Modern Admin use the common menu JSON object to generate same menu on each pages of your template that will save your time by reducing the repetitive menu customization task on each page. This template has menu example pug file for every layouts, Here in below example, it shows vertical menu layout menu PUG file vertical-menu.pug, you can use it on template level only it will generate whole template with the same menu options.

          
            +horizontalMenu([

            //- Dashbaord
            {url:"index.html",name:"Dashboard",slug:"dashboard",icon:"la la-home",  classlist:"disabled"},

            //- Dropdown Menu Start
            {url:"#", name:"Menu levels", icon:"la la-tv", slug:"", dropdown:"1",
            //- Menu Levels Submenu
            submenu:[
            {url:"#", name:"Second level", slug:"", classlist:"disabled"},
            {url:"#", ame:"Second level with child", slug:"",
            submenu:[
            {url:"#", name:"Third level", slug:""},
            {url:"#", name:"Third level with child", slug:"",
            submenu:[
            {url:"#", name:"Fourth level", slug:"", classlist:"disabled"},
            {url:"#", name:"Fourth level", slug:""},
            ]
          },
          ]
        },
        {url:"#",name:"Second level",slug:""},
        ]
      },
      //- Dropdown Menu End
      ]);