PHP code example of eseperio / yii2-bigmenu-widget
1. Go to this page and download the library: Download eseperio/yii2-bigmenu-widget 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/ */
eseperio / yii2-bigmenu-widget example snippets
echo Bigmenu::widget([
'items' => [
[
'label' => 'Home',
'url' => ['site/index'],
'linkOptions' => [...],
],
[
'label' => 'Multilevel',
'items' => [
['label' => 'Level 1 - Dropdown A', 'url' => '#'],
'<li class="divider"></li>',
'<li class="dropdown-header">Dropdown Header</li>',
['label' => 'Level 1 - Dropdown B', 'url' => '#'],
],
],
[
'label' => 'Login',
'url' => ['site/login'],
'visible' => Yii::$app->user->isGuest
],
[
'label' => 'Login',
'url' => ['site/login'],
'visible' => Yii::$app->user->isGuest,
'page' => ['site/menu']
],
],
'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation
'jsOptions' => ['widthToEnableResponsive'=> 768], // set this to override the options used in js
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.