module layout problem

Hi all,

First experience with a module and I cannot seem to get it fully working.

When I initially load the admin/default/index Yii renders the special module layout I have declared [admin] location: protected/modules/admin/view/layouts/admin.php

When, howerver, I change to lets say r=admin/users/create yii renders my application layout file instead of my module one.

I created the above UsersController in the main applicatioin and moved it over to the module controllers folder. Did the same with all crud files since I could not figure out how to generate them all directly in the module section from cli if someone can point a solution to that as well please.

How can I make yii use my module layout file all the time in all module calls.

I have the following settings in my AdminModule init method:





                //setting layout file




Ok it is all working now…I have no explanation. I haven’t made any changes just came back online and gave it a try… LOL

I would still like to know how to generate models and crud via CLI directly into the module section and not in the application?

Type in yiic shell: help model (help crud)

thanks that helped.