CodeIgniter Forums
multi controller in subfolder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: multi controller in subfolder (/thread-51637.html)



multi controller in subfolder - El Forum - 05-11-2012

[eluser]teddy[/eluser]
I want to make 2 folder frontend and backend in directory controller, but I don't know how to call them, I found some old topic like my question but how to make it ci version 2.1.
Thanks


multi controller in subfolder - El Forum - 05-11-2012

[eluser]CroNiX[/eluser]
/application/controller/backend/controller1.php (you can only go 1 directory deep in /controller, so you can't have /controller/dir1/dir2/controller1.php)

URL: http://yoursite.com/index.php/backend/controller1 (assuming you haven't removed the index.php using htaccess)

Personally, I'd just have "backend" and leave the front facing controllers in /application/controllers. Otherwise your urls for the frontend will all have "frontend" in them unless you remove them with routes.




multi controller in subfolder - El Forum - 05-11-2012

[eluser]weboap[/eluser]
as @CroNiX said or you can go hmvc http://codeigniter.com/wiki/Modular_Extensions_-_HMVC