3gwind
(3gwind)
1
I use yii version 1.1
it’s not work when i use nestd module
[code]
#yiic webapp myapp
#cd myapp
#yiic shell
>>module admin/blog
then:
vi main.conf
…
‘modules’=> array(
...
'admin/blog',
...
),
the error ‘page not found’ wheen i browser: http://myhostname/myapp/index.php?r=admin/blog
so i think the method is wrong
has friend know how use nestd module?
help me,please!
thanks very much!
[code]
3gwind
(3gwind)
2
I find answer from the url ‘http://www.yiiframework.com/doc/guide/basics.module#nested-module’
so i summarize for the question:
[code]
#yiic webapp myapp
#cd myapp
#yiic shell
>>module admin
>>module blog
>>exit
#mkdir -p modules/admin/modules
#mv blog modules/admin/modules/
#vi protected/config/main.php
add the blow code
…
‘modules’=>array(
...
'admin'=>array(
'modules'=>array(
'blog',
),
),
....
),
…
[code]
but note blow:
the directory struct
myapp
…
modules
…
admin
…
modules
...
blog
models
views
controller
and the {$webdir}myapp/config/main.php
…
‘modules’=>array(
'admin'=>array(
'modules'=>array(
'blog',
),
),
),
…
It’s work when setting for above