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.
Page 1 of 1
Gii: CRUD creation for model in Module Doesn't load files into module folders but default folders
#2
Posted 07 June 2010 - 10:13 PM
You need to specify the ControllerID with the module name, e.g. admin/post
#3
Posted 08 June 2010 - 11:52 AM
qiang, on 07 June 2010 - 10:13 PM, said:
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 (62.53K)
Number of downloads: 758
#4
Posted 21 August 2010 - 05:36 AM
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
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
#5
Posted 16 November 2010 - 10:27 PM
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:
controllers\users\UsersController.php
views\users\users\_form.php
views\users\users\_search.php
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
controllers\users\UsersController.php
views\users\users\_form.php
views\users\users\_search.php
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
Share this topic:
Page 1 of 1

Help














