An extended bootstrap Nav widget for Yii Framework 2 with submenu drilldown. This widget extends the
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
\kartik\dropdown\NavX extension by default for rendering dropdown navigation, but this can be overridden.
Note: This extension depends on the kartik-v/yii2-widgets extension which in turn depends on the yiisoft/yii2-bootstrap extension. Check the composer.json for this extension's requirements and dependencies. Note: Yii 2 framework is still in active development, and until a fully stable Yii2 release, your core yii2-bootstrap packages (and its dependencies) may be updated when you install or update this extension. You may need to lock your composer package versions for your specific app, and test for extension break if you do not wish to auto update dependencies.
You can see detailed documentation with examples on usage of the extension.
Note: This extension mandatorily requires Yii Framework 2.
The preferred way to install this extension is through composer.
$ php composer.phar require kartik-v/yii2-nav-x "*"
require section of your
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 ]);
yii2-nav-x is released under the BSD 3-Clause License. See the bundled
LICENSE.md for details.