Swicth layout if logged in or not

(DBCreator) #1

I am using the Advanced Template and would like to have a different view depending if the user is logged in or not.

I came across https://stackoverflow.com/questions/36888464/two-different-layouts-for-guest-user-logged-in-user-yii2 which seemed very promising, but I must be doing something wrong.

Should the code work?
Am I wrong that I would add the code to my backend\config\main.php?

(DBCreator) #2

Solved. The code is good but it is conflicting with another extension.