[Solved] Nested Module

Hi, this is my first time create a webapp using Yii.

Here’s what I need:

admin module contains post module, etc.

This is what I found at user guide:

It’s not adequate for me. I don’t know the correct way to do that and maybe I misinterpret it. So I just create admin and post module from yiic shell. Create a new directory named ‘modules’ in admin module directory. Cut and paste post module directory to admin module’s ‘modules’ directory. The directory now looks like this:


protected/

  modules/

    admin/

      components/

      controllers/

      messages/

      models/

      modules/

        post/

          components/

          controllers/

          messages/

          models/

          views/

      views/

If I request (there’s a .htaccess):

http://localhost/testdrive/admin/ --> run well

http://localhost/testdrive/admin/post --> error 404

Any help would be appreciated, thanks in advance.

Specify your submodule in your config:




'modules'=>array(

  'admin'=>array(

    'modules'=>array(

      'post',

    ),

  ),

),



Thanks jayrulez :), it’s solved now.

I don’t know why. But your solution doesn’t work for me :( . Should I change/set something elsewhere?