Created
December 6, 2011 23:15
-
-
Save elihubogan/1440529 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div> | |
26 </div><!-- header --> | |
27 | |
28 <div id="mainmenu"> | |
29 <?php $this->widget('zii.widgets.CMenu',array( | |
30 'items'=>array( | |
31 array('label'=>'Home', 'url'=>array('/site/index')), | |
32 array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')), | |
33 array('label'=>'Contact', 'url'=>array('/site/contact')), | |
34 array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest), | |
35 array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest), | |
36 // ERB: added for yii-user extension | |
37 array('url'=>Yii::app()->getModule('user')->loginUrl, 'label'=>Yii::app()->getModule('user')->t("Login"), 'visible'=>Yii::app()->user->isGuest), | |
38 array('url'=>Yii::app()->getModule('user')->registrationUrl, 'label'=>Yii::app()->getModule('user')->t("Register"), 'visible'=>Yii::app()->user->isGuest), | |
39 array('url'=>Yii::app()->getModule('user')->profileUrl, 'label'=>Yii::app()->getModule('user')->t("Profile"), 'visible'=>!Yii::app()->user->isGuest), | |
40 array('url'=>Yii::app()->getModule('user')->logoutUrl, 'label'=>Yii::app()->getModule('user')->t("Logout").' ('.Yii::app()->user->name.')', 'visible'=>!Yii::app()->user->isGuest), | |
41 ), | |
42 )); ?> | |
43 </div><!-- mainmenu --> | |
44 <?php if(isset($this->breadcrumbs)):?> | |
45 <?php $this->widget('zii.widgets.CBreadcrumbs', array( | |
46 'links'=>$this->breadcrumbs, | |
47 )); ?><!-- breadcrumbs --> | |
48 <?php endif?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment