PHP code example of startpl / yii2-nested-sets-menu

1. Go to this page and download the library: Download startpl/yii2-nested-sets-menu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

startpl / yii2-nested-sets-menu example snippets


 <?= 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',
 ]);