Different main.php not layout file

Masters, I need your help again. haha I finished redirecting my backend.php to the site/login page the problem is i need to create an main-admin.php that will only display a box with the login and another main.php that will have the navigations.

I can’t seem to find any relevant answers in the forum. I only see them setting the layout. I need to use the main-admin.php for guest and then redirect to the main.php when logged so the navigation is hidden from the admin login page.

Thanks guys :)

There’s no need for two layout files. Navigation can be displayed conditionally in your main layout:

<?php if ( ! Yii::app()->user->isGuest) : ?>

	<div id="navigation">



<?php endif ?>