Widget to display nested sets as Menu

1.0.0 2020-02-13 10:32 UTC

This package is auto-updated.

Last update: 2020-02-13 10:33:17 UTC


Widget to display nested sets as Menu

Packagist Packagist Version


The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist startpl/yii2-nested-sets-menu "*"

or add

"startpl/yii2-nested-sets-menu": "*"

to the require section of your composer.json file.


A basic usage looks like the following:

* <?= Menu::widget([
*     'items' => \startpl\yii2NestedSetsMenu\services\MenuArray::getData($data), // $data is your models|rows
*     'options' => ['id'=>'main-menu', 'class' => 'menu'],
*     'encodeLabels'=>false,
*     'activateParents'=>true,
*     'activeCssClass'=>'active',
* ]);?>

Also you can extending of MenuArray, NestedSetsTreeMenu for fine-tune your data