Closed nhymxu closed 9 years ago
First off all you need to fix your module namespace, to: frontend\modules\test\Module
. Remember that in advanced
and start
templates doesn't exist app
namespace.
After, you must add to your frontend/config/mai.php
config, the URL rules for your new module.
Something like this:
'<_c>/<_a>' => '<_c>/<_a>',
'<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>'
See also this issue.
And finally you'll can run your module on this url: yii.nx/test/default/index/
. The /
at the end is required.
thank for your reply. I try with "namespace app\modules\thutest;"
add "'thutest' => 'thutest/default/index'," to urlManager and it's work. I will try your rule.
Thanks you
How to using module generate by gii? I try generate on yii2basic gii Copy to frontend/modules/test folder add config to frontend/config/main.php
but try run yii.nx/test/ then not work. Write same on yii2 basic work well?