hi all , maybe it will be a easy question , i m really new in programming …
i would like to know how if it is better to use the controller without put the if clauses inside the view .
is preferable to use controller instead putting directly in view ?
at the moment i do like this
if (Yii::app()->user->isGuest) {
?>
<div class="dashIcon span-3">
<a href="/user/registration/"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/images/big_icons/icon-key.png" alt="Page" /></a>
<div class="dashIconText"><a href="/user/registration/"><?php echo Yii::t('homepage', 'Registration'); ?></a></div>
</div>
<?php
} else {
?>
<div class="dashIcon span-3">
<a href="/user/profile/"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/images/big_icons/icon-person2.png" alt="Products" /></a>
<div class="dashIconText"><a href="/user/profile/"><?php echo Yii::t('homepage', 'Your Profile'); ?></a></div>
</div>
<?php
}