2017 © Pedro Peláez
 

yii2-extension navmenu

Yii2 navmenu widgets

image

kak/navmenu

Yii2 navmenu widgets

  • Thursday, December 21, 2017
  • by sanchezzzhak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 50 % Grown

The README.md

kak-navmenu

Sidebar, TopMenu, Tabs, widgets for Yii2, (*1)

Preview

Installation

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)

Usage 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 ?>

Usage 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],
        // ...
    ]
]);

The Versions

21/12 2017

dev-master

9999999-dev https://github.com/sanchezzzhak/kak-navmenu

Yii2 navmenu widgets

  Sources   Download

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