Nested Sets Menu Widget ¶
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:
`
php
<?= 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',
]);?>
`
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.