Gii: CRUD creation for model in Module

I’m not sure if this is intentional or that much of a bug however when operating Gii I can create modules fine, and then I can thus create models in the module no problem (using the application.modules.modulename.models as the path) and so forth.

However when I go to create a CRUD operation for the model for the module, using application.modules.modulename.models.modelname

it displays the preview of everything generating under the default views and controller folders (as opposed to the ones associated with the module).

This isn’t a huge issue as files can be copied to the right place, however if code was ever associated with production based on location in the directory, then there would be issues.

Not sure if anyone else has gotten this little set back. Otherwise Gii works awesome and is a really creative idea.

Anymore information required, let me know.

You need to specify the ControllerID with the module name, e.g. admin/post

Awesome figured it out, thanks. We can probably move this to a more likely checked section for assisting users later, I’ve uploaded a screen shot so readers can view the actual inputs and results.


Understanding Modules - Controllers.PNG

thanks for posting your solution - it helped…

and another thing: if your crud still won’t be created under the modules directory - don’t forget to add the module into your config

Has something changed with this, or is there a new bug? Using a two day old SVN version, when using as was posted in the picture, I get paths like the following in the preview:




etc. etc

The files are generated as the paths show, and actually work, but I would expect them to be generated within the module

ehh! Figured it out - please remember to update your configuration file after creating your module :)

thanks for this, I coulnd’t figured it out but now I do :D