Layout inside module

Hi, I don't know if it is normal or should be posted here.

Why do I have to explicity type this command inside the module.

class AdminModule extends CWebModule


    public $layout = 'main';


Without this command, my module reads the "aplication mother" layouts for default.

I do have the file generated by shell command.

Here: \protected\modules\admin\views\layouts\main.php

Shouldn’t the application know about this as default without needing to “public $layout = ‘main’;” ???

Hope I'm not blabling!


This is by design, no particular reason. Not all moudules need to have their own layout.

I understand.

Well, should it be documented at least?

It's not trivial in my opinion.