dev-master
9999999-dev https://github.com/sanchezzzhak/kak-navmenuYii2 navmenu widgets
MIT
The Requires
- php >=5.4.0
- bower-asset/store.js ~2.0
- bower-asset/slimscroll >=1.3.3
by Tutik Alexsandr
yii2 widget navmenu bootstrap navmenu for yii2
Yii2 navmenu widgets
Sidebar, TopMenu, Tabs, widgets for Yii2, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist kak/navmenu "*"
or add, (*4)
"kak/navmenu": "*"
to the require section of your composer.json
file., (*5)
Sidebar
Once the extension is installed, simply use it in your code by :, (*6)
use kak\widgets\navmenu\Sidebar; use yii\web\View; use yii\web\Controller; /** * @var $this View * @var $context Controller */ $context = $this->context; ?> <body>= Sidebar::widget([ 'theme' => Sidebar::THEME_BLACK, 'items' => [[ 'active' => $context->id === 'rbac' && $context->action->id === 'index', 'label' => 'RBAC', 'url' => ['/rbac'], 'icon' => 'fa fa-shield' ],[ 'items' => [/* ... */] ]] ]);?>= $content ?>or= $content ?>
Tabs
(responsive bootstrap tabs)use kak\widgets\navmenu\Tabs; echo Tabs::widget([ 'options' => ['class' => 'nav nav-tabs '], 'items' => [ ['label' => 'Stat for Month', 'url' => ['month'], 'active' => true], // ... ] ]);
Yii2 navmenu widgets
MIT
yii2 widget navmenu bootstrap navmenu for yii2