A simple tutorial:
In this example, you want to create a module core with a submodule management in the website.
Create with gii the two modules. Add the folder "modules" in the module core . Remove the module management in this new folder.
The File-Structure should be a kind of this:
/protected
---/modules
---/core
---/controllers
---/modules
---/management
--- ...
---/views
Now, You must configure your main.php or config.php in the folder "config" ( in the root-folder "protected"):
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii' => array(
'class' => 'system.gii.GiiModule',
'generatorPaths' => array(
'bootstrap.gii', // since 0.9.1 /Twitter bootstrap)
),
),
'core'=>array(
'modules'=>array(
'management',
),
),
),
And modify the "import"-Array in this file:
// [MODULE] Core
'application.modules.core.models.*',
'application.modules.core.components.*',
'application.modules.core.widgets.*',
// [MODULE] Management
'application.modules.core.modules.management.models.*',
'application.modules.core.modules.management.components.*',
Now, you have the possibility to use all components, models, etc. of the submodule "management" in the same kind like the module core.
For example, if you want to add a submodule login in submodule management, you have to modify your "modules"-Array like that:
'core'=>array(
'modules'=>array(
'management' => array(
'modules' => array(
'login',
),
),
),
),
),
You have to modify your "import"-Array too.
And so on, and so on.
I hope, that can help you.
Best Regards,
Riff