Well, currently I've this main_menu table in my database.
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2016 at 04:49 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET #OLD_CHARACTER_SET_CLIENT=##CHARACTER_SET_CLIENT */;
/*!40101 SET #OLD_CHARACTER_SET_RESULTS=##CHARACTER_SET_RESULTS */;
/*!40101 SET #OLD_COLLATION_CONNECTION=##COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `database`
--
-- --------------------------------------------------------
--
-- Table structure for table `main_menu`
--
CREATE TABLE `main_menu` (
`id` bigint(20) NOT NULL,
`title` text COLLATE utf8_unicode_ci NOT NULL,
`link` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`parentid` bigint(20) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `main_menu`
--
ALTER TABLE `main_menu`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `main_menu`
--
ALTER TABLE `main_menu`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;
/*!40101 SET CHARACTER_SET_CLIENT=#OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=#OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=#OLD_COLLATION_CONNECTION */;
And I have this code to make dropdown menu (not bootstrapped)
<?php
error_reporting(0);
ini_set('display_errors', 0);
header('Content-Type: text/html; charset=utf-8');
//Set the database connection
// $con1 = mysqli_connect('localhost','root','');
$con1 = mysqli_connect('localhost', '', '');
// mysqli_select_db($con1, 'database_name') or die(mysqli_error($con1));
mysqli_select_db($con1, 'database_name') or die(mysqli_error($con1));
//select all rows from the main_menu table
mysqli_query($con1, "SET NAMES utf8");
$result = mysqli_query($con1, "select id,title,parentid,link from main_menu order by id asc");
//create a multidimensional array to hold a list of menu and parent menu
$menu = array(
'menus' => array(),
'parent_menus' => array()
);
//build the array lists with data from the menu table
while ($row = mysqli_fetch_assoc($result)) {
//creates entry into menus array with current menu id ie. $menus['menus'][1]
$menu['menus'][$row['id']] = $row;
//creates entry into parent_menus array. parent_menus array contains a list of all menus with children
$menu['parent_menus'][$row['parentid']][] = $row['id'];
}
mysqli_set_charset($con1,"utf8");
// Create the main function to build milti-level menu. It is a recursive function.
function buildMenu($parent, $menu) {
$html = "";
if (isset($menu['parent_menus'][$parent])) {
$html .= "<ul>";
foreach ($menu['parent_menus'][$parent] as $menu_id) {
if (!isset($menu['parent_menus'][$menu_id])) {
$html .= "<li><a href='" . $menu['menus'][$menu_id]['link'] . "'>" . $menu['menus'][$menu_id]['title'] . "</a></li>";
}
if (isset($menu['parent_menus'][$menu_id])) {
$html .= "<li><a href='" . $menu['menus'][$menu_id]['link'] . "'>" . $menu['menus'][$menu_id]['title'] . "</a>";
$html .= buildMenu($menu_id, $menu);
$html .= "</li>";
}
}
$html .= "</ul>";
}
return $html;
}
?>
It's working until now, but the problem is I've tried copy/paste the code into the bootstrap theme called Karma that I purchased recently, and I can't figure out how to make the menu based on my main_menu table.
Here's the sample bootstrapped navigation code
<div class="sidebar-module">
<nav class="sidebar-nav-v2">
<ul>
<li class="page-arrow active-page">
<i class="fa fa-dashboard"></i> Dashboard <span class="indicator-pill">32</span>
</li>
<li>
<i class="fa fa-sun-o"></i> Statistics<span class="indicator-dot">2</span>
</li>
<li>
<i class="fa fa-bar-chart-o"></i> Charts
</li>
<li>
<i class="fa fa-calendar-o"></i> Calendar
</li>
<li>
<i class="fa fa-envelope-o"></i> Form Elements <i class="fa fa-caret-left pull-right"></i>
<!-- * sub menu * -->
<ul>
<li>
Forms
</li>
<li>
Forgot Form
</li>
<li>
Login Form
</li>
<li>
Login 2 Form
</li>
<li>
Reset Form
</li>
<li>
Signup Form
</li>
<li>
Wizard
</li>
<li>
WYSIWYG
</li>
</ul>
</li>
<li>
<i class="fa fa-file-o"></i> Pages <i class="fa fa-caret-left pull-right"></i>
<!-- * sub menu * -->
<ul>
<li>
Billing
</li>
<li>
Comments
</li>
<li>
Clients
</li>
<li>
FAQs
</li>
<li>
Files
</li>
<li>
Planning
</li>
<li>
Social
</li>
<li>
Ticket Support
</li>
<li>
Timeline
</li>
<li>
Wiki
</li>
</ul>
</li>
<li>
<i class="fa fa-star-o"></i> UI Elements<i class="fa fa-caret-left pull-right"></i>
<!-- * sub menu * -->
<ul>
<li>
Buttons & Icons
</li>
<li>
Notifications
</li>
<li>
Dropdown & Menu
</li>
<li>
Misc
</li>
<li>
Tabs
</li>
<li>
Toolbars
</li>
</ul>
</li>
<li class="seperator">
<!-- * seperator line * -->
</li>
<li>
<i class="fa fa-picture-o"></i> Media
</li>
<li>
<i class="fa fa-wrench"></i> Modules
</li>
<li>
<i class="fa fa-table"></i> Tables
</li>
<li>
<i class="fa fa-th"></i> Page Layout
</li>
<li>
<i class="fa fa-warning"></i> Error Pages <i class="fa fa-caret-left pull-right"></i>
<!-- * sub menu * -->
<ul>
<li>
400
</li>
<li>
401
</li>
<li>
403
</li>
<li>
404
</li>
<li>
500
</li>
<li>
503
</li>
</ul>
</li>
<li class="menu-label">
<div class="spacer-20"></div>
Some group label
<div class="spacer-10"></div>
</li>
<li>
<i class="fa fa-map-marker"></i> Maps
</li>
<li>
<i class="fa fa-columns"></i> Widgets
</li>
<li>
<i class="fa fa-sitemap"></i> Sitemap
</li>
</ul>
</nav>
<!-- End .sidebar-nav-v1 -->
</div>
<!-- End .sidebar-module -->
Can anyone help me converting my old menu into bootstrapped navigation?
There is no bootstrap dropdown class in your html code. here is snippet. make sure to include jquery, bootstrap in your code(which is included in this snippet) the link tag comes under head tag and script tag under body tag.
.navbar-nav > li:hover ul.dropdown-menu, .menu li:hover ul.dropdown-menu{
display: block;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Start Bootstrap</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="page-arrow active-page">
<i class="fa fa-dashboard"></i> Dashboard <span class="indicator-pill">32</span>
</li>
<li>
<i class="fa fa-sun-o"></i> Statistics<span class="indicator-dot">2</span>
</li>
<li>
<i class="fa fa-bar-chart-o"></i> Charts
</li>
<li>
<i class="fa fa-calendar-o"></i> Calendar
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-envelope-o"></i> Form Elements <i class="fa fa-caret-left pull-right"></i> <span class="caret"></span></a>
<!-- * sub menu * -->
<ul class="dropdown-menu">
<li>
Forms
</li>
<li>
Forgot Form
</li>
<li>
Login Form
</li>
<li>
Login 2 Form
</li>
<li>
Reset Form
</li>
<li>
Signup Form
</li>
<li>
Wizard
</li>
<li>
WYSIWYG
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-file-o"></i> Pages <i class="fa fa-caret-left pull-right"></i> <span class="caret"></span></a>
<!-- * sub menu * -->
<ul class="dropdown-menu">
<li>
Billing
</li>
<li>
Comments
</li>
<li>
Clients
</li>
<li>
FAQs
</li>
<li>
Files
</li>
<li>
Planning
</li>
<li>
Social
</li>
<li>
Ticket Support
</li>
<li>
Timeline
</li>
<li>
Wiki
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-star-o"></i> UI Elements<i class="fa fa-caret-left pull-right"></i> <span class="caret"></span></a>
<!-- * sub menu * -->
<ul class="dropdown-menu">
<li>
Buttons & Icons
</li>
<li>
Notifications
</li>
<li>
Dropdown & Menu
</li>
<li>
Misc
</li>
<li>
Tabs
</li>
<li>
Toolbars
</li>
</ul>
</li>
<li class="seperator">
<!-- * seperator line * -->
</li>
<li>
<i class="fa fa-picture-o"></i> Media
</li>
<li>
<i class="fa fa-wrench"></i> Modules
</li>
<li>
<i class="fa fa-table"></i> Tables
</li>
<li>
<i class="fa fa-th"></i> Page Layout
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-warning"></i> Error Pages <i class="fa fa-caret-left pull-right"></i> <span class="caret"></span></a>
<!-- * sub menu * -->
<ul class="dropdown-menu">
<li>
400
</li>
<li>
401
</li>
<li>
403
</li>
<li>
404
</li>
<li>
500
</li>
<li>
503
</li>
</ul>
</li>
<li class="menu-label">
<div class="spacer-20"></div>
Some group label
<div class="spacer-10"></div>
</li>
<li>
<i class="fa fa-map-marker"></i> Maps
</li>
<li>
<i class="fa fa-columns"></i> Widgets
</li>
<li>
<i class="fa fa-sitemap"></i> Sitemap
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
basically your html code should look like this image
Related
Left side menu with scroll bar when click on menu link then scroll bar move not show scroll bar near to the clicked menu.
As u can see in w3schools site when clicked on side menu then scroll bar again comes on its same position on which menu we have clicked. I want same work as show by me a menu list in which tag with list item I have used scroll bar class of .scroll_text_menu
now my question is when I clicked on scroll bar menu than its goes upper side not leaves near clicked menu
Code:
.scroll_text_menu {
height: 640px;
overflow-y: scroll;
line-height: 1px;
}
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu ">
<div class="menu_section">
<h3>Dashboard</h3>
<?php
$userType = $this->session->userData('userType');
?>
<ul class="nav side-menu scroll_text_menu">
<?php if ($userType == 1) { ?>
<li>
<i class="fa fa-bank"></i> Account Management
</li>
<li>
<i class="fa fa-file-text" ></i> Training Program
</li>
<?php } ?>
<?php if (in_array($userType, array("1", "2"))) { ?>
<li>
<i class="fa fa-user-md" style="font-size:19px"></i> Coach Management
</li>
<?php } ?>
<?php if (in_array($userType, array("1", "2", "3"))) { ?>
<li>
<i class="fa fa-user" ></i> Athlete Management
</li>
<li>
<i class="fa fa-users" style="font-size: 17px;"></i> Team Management
</li>
<li>
<i class="fa fa-houzz" style="font-size:20px"></i> Exercise Parent Type
</li>
<li>
<i class="fa fa-th-large" aria-hidden="true"></i> Exercise Types
</li>
<li>
<i class="fa fa-wheelchair-alt"></i> Exercise
</li>
<li>
<i class="fa fa-columns" aria-hidden="true"></i> Exercise Sets
</li>
<li>
<i class="fa fa-users" style="font-size: 17px"></i> Training Plan
</li>
<li>
<i class="fa fa-map-o" style="font-size: 17px"></i> Programs Plans
</li>
<li>
<i class="fa fa-lock" ></i> Privacy Policy
</li>
<li>
<i class="fa fa-question-circle-o" aria-hidden="true" ></i><span > Questionnaire</span>
</li>
<li>
<i class="fa fa-file-text-o"></i> User Answer
</li>
<li>
<i class="fa fa-building-o" ></i> School
</li>
<li>
<i class="fa fa-newspaper-o" aria-hidden="true" ></i> Position Title
</li>
<li>
<i class="fa fa-futbol-o" ></i> Sports
</li>
<li>
<i class="fa fa-language"></i> Languages
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
I have the following html sidebar menu:
<li {{{ (Request::is('bookings/*') }}} data-toggle="collapse" data-target="#bookings">
<i class="fa fa-address-book" aria-hidden="true"></i> Bookings <i class="fa fa-chevron-down" aria-hidden="true"></i>
</li>
<ul class="sub-menu collapse" id="bookings">
<li class="collapsed">All Bookings</li>
<li class="collapsed" >Add New</li>
</ul>
<li {{{ (Request::is('bookings/*') || Request::is('bookings') ? 'class=active' : '') }}} data-toggle="collapse" data-target="#item2">
<i class="fa fa-address-book" aria-hidden="true"></i> Item 2 <i class="fa fa-chevron-down" aria-hidden="true"></i>
</li>
<ul class="sub-menu collapse" id="item2">
<li {{{ (Request::is('bookings') ? 'class=active' : 'collapsed') }}}>All Bookings</li>
<li {{{ (Request::is('bookings/create') ? 'class=active' : 'collapsed') }}} >Add New</li>
</ul>
This is a basic Bootstrap collapse menu that contains a sub menu which expands when the li element is clicked.
The problem I have is lets say I have 2 or 3 of these menu items that all have sub menus. There is a possibility that all of them could open at the same time, I don't like this because this forces a scroll overflow as the height increases which then shows a scrollbar for the side menu.
Is there a way I can prevent multiple elements from being expanded in Bootstrap?
I am using Laravel 5 if that helps.
I think this should help you, just play a little with it to adapt it to your needs:
<div class="row">
<div class="col">
<ul class="nav nav-stacked" id="accordion1">
<li class="panel"> <a data-toggle="collapse" data-parent="#accordion1" href="#firstLink">Test12</a>
<ul id="firstLink" class="collapse">
<li>SubTest1</li>
<li>SubTest1</li>
<li>SubTest1</li>
</ul>
</li>
<li class="panel"> <a data-toggle="collapse" data-parent="#accordion1" href="#secondLink">Test2</a>
<ul id="secondLink" class="collapse">
<li>SubTest2</li>
<li>SubTest2</li>
<li>SubTest2</li>
<li>SubTest2</li>
</ul>
</li>
</ul>
</div>
</div>
See it here
https://codepen.io/anon/pen/ZaMOxN
I have 2 tables admin and superadmin. I have same login page for both
users. i can login according to query.i had create sessions for both
users. each table have column name roleID. for superadmin roleID is
1, and for admin roleID is 2. Below is my code for login where i
create session. i used print_r and my session are working. Below is
my code for login page.
if (isset($_REQUEST['submit']))
{
$username = $_REQUEST['user'];
$password = $_REQUEST['pass'];
$sql = mysqli_query($conn,"SELECT * FROM `accountants` where `acc_email` = '".$username."' AND `acc_pass` = '".$password."'");
$data = mysqli_fetch_array($sql);
$_SESSION['role0']=$data['roleId'];
$_SESSION['username']=$data['acc_name'];
$sql1 = mysqli_query($conn,"SELECT * FROM `superadmin` where `username` = '".$username."' AND `password` = '".$password."'");
$data1 = mysqli_fetch_array($sql1);
$_SESSION['role1']=$data1['roleId'];
if ($data>0)
{
header('Location: societyList.php');
}
elseif ($data1>0) {
header('Location: home.php');
}
else
{
header('Location: index.php');
echo 'incorrect login';
}
}
Now on home.php i have some menus to show accoording to roleID my
code for menu.
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
<div class="menu_section">
<h3>General</h3>
<ul class="nav side-menu">
<li><a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Create Society</li>
</ul>
</li>
<li><a><i class="fa fa-home"></i> Master <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Units</li>
<li>Members</li>
<li>Parking Lots</li>
<li>Charges</li>
<li>Chart of Account</li>
<li>Interest Penalties</li>
<li>Billing Templates</li>
<li>Tax Structure</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> Transactions <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Bill</li>
<li>Collection</li>
<li>Expenses</li>
<li>Journal</li>
<li>Bank Reco</li>
<li>Drop Box</li>
<li>Online Payment</li>
</ul>
</li>
<li><a><i class="fa fa-desktop"></i> Reports <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Income & Expenses</li>
<li>Balance Sheet</li>
<li>Cash Flow</li>
<li>Interest Calculation</li>
</ul>
</li>
<li><i class="fa fa-table"></i> Notices <span class="fa fa-chevron-down"></span>
</li>
<li><a><i class="fa fa-bar-chart-o"></i> Registers <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Form-I</li>
</ul>
</li>
<li><a><i class="fa fa-clone"></i> Forum <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Cultural Activity</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> Domestic Help <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Request for Plumber</li>
<li>Request for Maid</li>
<li>Request for House Cleaner</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> Emergency <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Ambulance</li>
<li>Fire Brigade</li>
<li>Police</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> Helpdesk <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Request NOC for Tenancy</li>
<li>Request NOC for Home Loan</li>
<li>Request NOC for Mortgage as collateral</li>
<li>Request for Vehicle Parking</li>
<li>Application for Transfer</li>
<li>Request for waiver of interest</li>
<li>Request for waiver of a charge</li>
<li>Suggestion</li>
<li><a><i class="fa fa-edit"></i><span class="fa fa-chevron-down"></span>Complaint</a>
<ul class="nav child_menu">
<li>About leakage</li>
<li>About tenants issues</li>
<li>About parking nuisance
</ul>
</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> CFO Desk Assists <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Tenant Rating</li>
<li>Owners Rating</li>
<li>Your Reviews</li>
</ul>
</li>
<li><a><i class="fa fa-edit"></i> Masters <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li>Auto Bank reconcilliation</li>
<li>AMC Masters</li>
<li>Auto Adjust pending reference</li>
<li>Default GL for defined transactions</li>
</ul>
</li>
</ul>
</div>
</div>
As you can see lists. i want if $_SESSION['role0']=$data['roleId']; in session so first 4 lists will be visible for him only.
If $_SESSION['role1']=$data['roleId']; in session then rest of all lists will be display to him.
How to done it please help me with the same. I used if condition like
if{$_REQUEST($_SESSION['role0'])
echo 'some lists';
}
if i used like this if condition nothing will display.
The session data is note stored in the $_REQUEST.
$_SESSION['role0']=$data1['roleId'];
$_SESSION['role1']=$data1['roleId'];
Both 'role0' and 'role1' will have the same value. It can be simplified to:
$_SESSION['role']=$data1['roleId'];
Then use:
if( $_SESSION['role'] === 1) {
echo 'admin role 1';
echo 'Show first half of menu';
} elseif ($_SESSION['role'] === 2) {
echo 'Show second half of menu';
} else {
echo 'Other or missing admin value. show no menu';
}
SQL injection is possible the way it is currently written. Prepared statements would be a good thing to add next.
I'm new to Yii framework..
Now i working with yii1.1.6 version.In admin panel menus i want to display as active menu while which menu item is selected.Please help me how to make menu item as active...
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li class="">
<i class="fa fa-fw fa-dashboard"></i> Home
</li>
<li class="">
<i class="fa fa-fw fa-bar-chart-o"></i> About Us
</li>
<li class="">
<i class="fa fa-fw fa-table"></i> Contact Us
</li>
</ul>
</div>
You can compare your controller id and action id like this:
if(Yii::app()->controller->id == 'site' && Yii::app()->controller->action->id == 'index'){
echo '<li class="active">';
}
I have this code.When I clicka link in sidebar, it goes to the concerned link and the menu is closed. I want to be opened the link as well as the menu which i have clicked.
I'm designing a 70+ page site that uses a combination of multi-tiered sidebar menus and image maps for navigation, plus breadcrumbs in the navbar to keep track of where you're at.
I want to be able to:
1. open the submenu panels and display the list of menu options available;
2. highlight the menu tree option for the current page; and
3. add the appropriate link for the current page to the breadcrumb pat.
However, when I make a change to the sidebar (e.g., add or delete a menu option, change the grouping or order of the submenu items, etc.), I have to make the exact same change times 70! After 1 or 2 of these revisions, I'd rather not make any more changes!
<div id="sidebar" class="navbar-collapse collapse">
<!-- BEGIN Navlist -->
<ul class="nav nav-list">
<li>
<div class="admin_logo">
<img src="img/logo.png" alt="Inksand Logo">
</div>
</li>
<li>
<a href="index.php">
<i class="fa fa-dashboard"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-file-text"></i>
<span>Catalog</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>
<a href="#" class="dropdown-toggle">
<span>Categories</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Categories</li>
<li>Manage Categories</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Vendors</span>
<b class="arrow fa fa-angle-right "></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Vendors</li>
<li>Manage Vendors</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Products</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Products</li>
<li>Manage Products</li>
</ul>
</li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-map-marker"></i>
<span>Localization</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>
<a href="#" class="dropdown-toggle">
<span>Countries</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Countries</li>
<li>Manage Countries</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>States</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add States</li>
<li>Manage States</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Cities</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Cities</li>
<li>Manage Cities</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Areas</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Areas</li>
<li>Manage Areas</li>
</ul>
</li>
<!--
<li>
<a href="#" class="dropdown-toggle">
<span>Misc</span>
<b class="arrow fa fa-angle-right"></b>
</a>
BEGIN Submenu
<ul class="submenu">
<li>Order Status</li>
<li>Payment
</ul>
</li>
-->
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-bar-chart-o"></i>
<span>Sales</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Order</li>
<li>Shipment</li>
<li>Return</li>
<li>Payment</li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="glyphicon glyphicon-list"></i>
<span>Stock</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Add Stock</li>
<li>Manage Stock</li>
<li>Manage Garbage</li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-money"></i>
<span>Tax</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li><a href=add-tax-master.php>Add Tax</a></li>
<li><a href=tax-master.php>Manage Tax</a></li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-user"></i>
<span>Customers</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Manage Customers</li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-cog"></i>
<span>Tools</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Banner</li>
<li>Backup</li>
<li>Setting</li>
</ul>
<!-- END Submenu -->
</li>
<li>
<a href="#" class="dropdown-toggle">
<i class="fa fa-file-text-o"></i>
<span>Report</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>
<a href="#" class="dropdown-toggle">
<span>Sales</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Order</li>
<li>Tax</li>
<li>Shipping</li>
<li>Return</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Products</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Viewed</li>
<li>Purchased</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Vendors</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Vendor</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle">
<span>Customers</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<!-- BEGIN Submenu -->
<ul class="submenu">
<li>Order</li>
<li>Cart</li>
<li>Wishlist</li>
</ul>
</li>
</ul>
<!-- END Submenu -->
</li>
</ul>
<!-- END Navlist -->
<!-- BEGIN Sidebar Collapse Button -->
<div id="sidebar-collapse" class="visible-lg">
<i class="fa fa-angle-double-left"></i>
</div>
<!-- END Sidebar Collapse Button -->
You need to add active class to item you want to be opened.
For example:
<ul class="submenu">
<li class="active">Add Categories</li>
<li>Manage Categories</li>
</ul>
top open Category menu and highlight "Add Categories" item.