views:

31

answers:

2

Is there any hack to provide two level sub directory controllers support ?

A: 

Not without modifying the core. Although, I'm not sure as why you would need to?

I would suggest that you focus on routes instead: http://codeigniter.com/user_guide/general/routing.html

By having one level subfolders in system/application/controllers you could with easy, by adding an URI route, make system/application/controllers/my_sub_level accessable trough http://example.com/myfirstlevel/mysecondlevel/mythirdlevel/my_sub_level by adding this route:

$route['myfirstlevel/mysecondlevel/mythirdlevel/my_sub_level/:any'] = "my_sub_level/welcome";
Repox
I know about routes but I need file structure to looks like controllers/frontend/misc/controller.php Do you know any core hacks ?
John
A: 

Well, I'll supply with extending the controller.

Copy this code into your CI application library folder (the default is /system/application/libraries), and name it as MY_Router.php

Repox
You just save my life. Thanks !
John