如何使我的侧边栏在当前页面中处于活动状态?

时间:2019-07-18 08:39:08

标签: twitter-bootstrap

如何使我的侧边栏在当前页面中处于活动状态,我陷入困境并需要帮助,这是我的sidebar.php代码:

   <ul id="dashboard" class="sidebar navbar-nav">
        <li class="nav-item <?php echo $this->uri->segment(1) == '' ? 'active': '' ?>">
            <a class="nav-link" href="<?php echo site_url('admin') ?>">
                <i class=""></i>
                <span>DASHBOARD</span>
            </a>

        </li>

        <li class="nav-item dropdown <?php echo $this->uri->segment(2) == 'list'? 'active': '' ?>">

            <a class="nav-link dropdown-toggle" href="#" id="pagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="false">
                <i class=""></i>
                <span>INCIDENT</span>
            </a>
            <div class="dropdown-menu" aria-labelledby="pagesDropdown">
                <a class="dropdown-item" href="<?php echo site_url('admin/problem/add') ?>">Problem IT Cabang</a>
                <a class="dropdown-item" href="<?php echo site_url('admin/atm/add') ?>">Problem Jarkom ATM</a>
                <a class="dropdown-item" href="<?php echo site_url('admin/Request/add') ?>">Request</a>
            </div>
        </li>

    </ul>

0 个答案:

没有答案