CodeIgniter Forums

Full Version: multi controller in subfolder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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.

El Forum

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