diff --git a/views/layouts/main.php b/views/layouts/main.php index 1f8611c..c5ad569 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -1,4 +1,6 @@ beginBody(); ?> - + 'My Company', + 'brandUrl' => Yii::$app->homeUrl, + 'options' => array( + 'class' => 'navbar-inverse navbar-fixed-top', + ), + )); + echo Menu::widget(array( + 'options' => array('class' => 'nav navbar-nav pull-right'), + 'items' => array( + array('label' => 'Home', 'url' => array('/site/index')), + array('label' => 'About', 'url' => array('/site/about')), + array('label' => 'Contact', 'url' => array('/site/contact')), + Yii::$app->user->isGuest ? + array('label' => 'Login', 'url' => array('/site/login')) : + array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')), + ))); + NavBar::end(); + ?>