kartik-v/yii2-nav-x 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kartik-v/yii2-nav-x

最新稳定版本:v1.2.5

Composer 安装命令:

composer require kartik-v/yii2-nav-x

包简介

An extended bootstrap Nav widget for Yii 2 with submenu drilldown.

README 文档

README

Krajee Logo
yii2-nav-x Donate       kartikv

Stable Version Unstable Version License Total Downloads Monthly Downloads Daily Downloads

An extended bootstrap Nav widget for Yii Framework 2 with submenu drilldown. This widget extends the \yii\bootstrap\Nav widget for Bootstrap 3.x and \yii\bootstrap4\Nav widget for Bootstrap 4.x \yii\bootstrap5\Nav widget for Bootstrap 5.x with some additional controls and adding the CSS Styles for enabling a submenu drilldown. The dropdown menu style is optimized for both desktop and mobile devices. The drilldown is triggered on active instead of hover so that it works equally well on mobile devices. The extension uses the one of the following Dropdown Class extensions by default for rendering dropdown navigation, but this can be overridden:

  • \kartik\dropdown\DropdownX for Bootstrap 3.x
  • \kartik\bs4dropdown\Dropdown for Bootstrap 4.x
  • \kartik\bs5dropdown\Dropdown for Bootstrap 5.x

Demo

You can see detailed documentation on usage of the extension.

Installation

Install the dependencies depending on the Bootstrap version used in your app:

  1. For Bootstrap 3.x install kartik-v/yii2-dropdown-x
$ php composer.phar require kartik-v/yii2-dropdown-x "@dev"
  1. For Bootstrap 4.x install kartik-v/yii2-bootstrap4-dropdown
$ php composer.phar require kartik-v/yii2-bootstrap4-dropdown "@dev"
  1. For Bootstrap 5.x install kartik-v/yii2-bootstrap5-dropdown
$ php composer.phar require kartik-v/yii2-bootstrap5-dropdown "@dev"

The preferred way to install this extension is through composer.

NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require kartik-v/yii2-nav-x "@dev"

or add

"kartik-v/yii2-nav-x": "@dev"

to the require section of your composer.json file.

Usage

NavX

use kartik\nav\NavX;
echo NavX::widget([
    'options' => ['class' => 'nav nav-pills'],
    'items' => [
        ['label' => 'Action', 'url' => '#'],
        ['label' => 'Submenu', 'items' => [
            ['label' => 'Action', 'url' => '#'],
            ['label' => 'Another action', 'url' => '#'],
            ['label' => 'Something else here', 'url' => '#'],
        ]],
        ['label' => 'Something else here', 'url' => '#'],
        '<li class="divider"></li>',
        ['label' => 'Separated link', 'url' => '#'],
    ],
    'encodeLabels' => false
]);

License

yii2-nav-x is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

统计信息

  • 总下载量: 547.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 27
  • 点击次数: 2
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 26
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-05-10