Set Different Layout For Visitors To Everything, Including Modules

Hello guys,

I would like to help.

I know define the layout for a controller, I know a layout set in a MainController class and extend it to all my controllers. But still could not find how to set a different layout for all visitors and any controller, especially the external modules such as yii2-user.

Can anyone give me a little help, please?


You have to set the $layout property of your module described in the Guide - using Layouts.

Follow the guide and try it yourself. If you have problems provide more details (code, etc.) what you have already tried and for sure someone is going to help ;)

@kokomo, the module is not mine, was installed via composer.

As I said in the message, I solve the problem with all codes MY, MY APP.

I want to know how to overwrite the same layouts of external modules. Then I can not solve … :rolleyes: