I have a login form in my header section of the website. If user is logged in than insted of the login form user profile details will be shown. The question is how to separate header footer and content into different views and call them from one controller? Or maybe there is another solution…Thanks for help.
<?php if(Yii::app()->user->isGuest): ?>
// Show Login form
<?php else: ?>
// show profile details
<php endif; ?>
I am using a CMenu in the upper right to show login links to guests or a link to edit logged in users profile using the ‘visible’=> of the ‘items’ array.