I have learned to create a separate module named “admin” to hold controllers and views for Admin section accessible via xyz.com/admin I’m keeping all my models in protected/models folder for now. However i’m trying to figure out how to create separate modules still keeping the admin controllers and views within the modules themselves.
Let me explain
List of Modules in my app:
-
cms
-
user
-
store
-
admin (i’m confused if this has to be there?)
Controllers
===========
-
protected/modules/cms/controllers/node.php
-
protected/modules/store/controllers/product.php
Above are two controllers from two different modules.
Problem:
========
Now if i generate "admin section controllers and views" from Gii for the above 2 controllers, they both go in admin module and get mixed up so the modularity of these modules is washed away. I want the "CMS" module complete in itself i.e. the admin section controllers and views are self-contained within the "CMS" modules directory and not in the separte "admin" module.
I’m learning Yii and a proper guide would be highly appreciated.
Thanks,
Raheel