startpl / yii2-nested-sets-menu
Widget to display nested sets as Menu
Installs: 73
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-11-24 15:35:33 UTC
README
Widget to display nested sets as Menu
Installation
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.
Usage
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', ]);?>