Hello there!
I installed a vanilla Yii2 advanced template and then follow this guideline: Installation guide: Yii-2 advanced template with RBAC system | Wiki | Yii PHP Framework to implement yii2-admin.
But when I try to show the menu, the options with sub items don’t show at all: I can only click on the top item.
I instantiate the menu using:
use yii\bootstrap5\Breadcrumbs;
use yii\bootstrap5\Html;
use yii\bootstrap5\Nav;
use yii\bootstrap5\NavBar;
use mdm\admin\components\MenuHelper;
[...]
$menuItems = MenuHelper::getAssignedMenu(Yii::$app->user->id);
echo Nav::widget([
'options' => ['class' => 'navbar-nav ml-auto'], // navbar-right'],
'items' => $menuItems,
'encodeLabels' => False,
]);
Any clue? Thank you!
S.