Commit 4b83aff0 by Alexander Makarov

Added signup link to frontend

parent b8ff2cc5
...@@ -27,17 +27,24 @@ AppAsset::register($this); ...@@ -27,17 +27,24 @@ AppAsset::register($this);
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container"> <div class="container">
<?php echo Menu::widget(array( <?php
'options' => array('class' => 'nav'), $menuItems = array(
'items' => array(
array('label' => 'Home', 'url' => array('/site/index')), array('label' => 'Home', 'url' => array('/site/index')),
array('label' => 'About', 'url' => array('/site/about')), array('label' => 'About', 'url' => array('/site/about')),
array('label' => 'Contact', 'url' => array('/site/contact')), array('label' => 'Contact', 'url' => array('/site/contact')),
Yii::$app->user->isGuest ? );
array('label' => 'Login', 'url' => array('/site/login')) : if (Yii::$app->user->isGuest) {
array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')), $menuItems[] = array('label' => 'Signup', 'url' => array('/site/signup'));
), $menuItems[] = array('label' => 'Login', 'url' => array('/site/login'));
)); ?> }
else {
$menuItems[] = array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout'));
}
echo Menu::widget(array(
'options' => array('class' => 'nav'),
'items' => $menuItems,
));
?>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment