Reputation: 6386
i'm going to be creating a complex ecommerce application and wanted to know if setting each login panel and area as a module into CI.
for example:
application
modules/
- backend/
-- config
-- controllers
-- models
-- views
- frontend/
-- config
-- controllers
-- models
-- views
- members/
-- config
-- controllers
-- models
-- views
if this method is a bad idea how else would it be done that will let me organise all the controllers, models, and views for each login panel.
Upvotes: 0
Views: 4186
Reputation: 376
you have to use HMVC (hierarchy of parent-child MCV layers) here, to setting up HMVC in CodeIgniter you need to visit the links
Upvotes: 0
Reputation: 1345
You should stick to the MVC pattern, that would mean having controller inside de controller folder, same with models and views.
You can still use sub folders to organize the files.
With your approach you have to modify and adapt CI to the new structure which means having future problems if you want to upgrade or even means having difficulties solving future errors, since your CI has been modified.
If you think it's worth it then do it,lets say because your project is big and you need it to be organized that way, then do it; There's nothing that can't be done here.
Upvotes: 1