how many levels of subfolders are supported ? |
[eluser]EugeneS[/eluser]
any one knows how many levels of controller subfolders are supported ? i mean next lets imagine i have folder structure: application/controllers/admin inside admin folder i have some controller for example "users" i can reach it like http://localhost/admin/users/ can i add another folder into the "admin" folder and then reach the controller inside it smth like: folder structure: application/controllers/admin/aaaa inside folder "aaaa" will be some controller "aaaacontroller" can i reach it through the url like this one or not: http://localhost/admin/aaaa/aaaacontroller/ i cant, but no sure should this way work or not, or only one level of the controller subfolders is supported.
[eluser]Rick Jolly[/eluser]
Yes, only one subfolder is supported. There is at least one user contribution to support unlimited nested subfolders. I think modular separation via Matchbox is a better solution though. That way your related views, libaries, etc. are closer.
[eluser]Michael Wales[/eluser]
Second time this question has been asked today. Go-Go Gadget Search Box!
[eluser]EugeneS[/eluser]
[quote author="Rick Jolly" date="1196208531"]Yes, only one subfolder is supported. There is at least one user contribution to support unlimited nested subfolders. I think modular separation via Matchbox is a better solution though. That way your related views, libaries, etc. are closer.[/quote] up to me 1 level of inclusions enough, but i'm doing now user management class with the different levels of permissions which i gonna use in all my applications so wanna do it quite universal
[eluser]EugeneS[/eluser]
[quote author="walesmd" date="1196210426"]Second time this question has been asked today. Go-Go Gadget Search Box![/quote] if so we have to ask this functionality in nearest CI release more over solution is already done
[eluser]AtlantixMedia[/eluser]
I have the following structure: admin/main admin/config/configview where admin is a folder, main is a controller, config is another controller, and configview is a function main.php Code: <?php config.php Code: <?php can someone tell me why I get a 404 error page when I try to access admin/config/configview whereas everything works ok when I access admin/main? also, I use the same structure elsewhere in my application and everything works ok. thanks
[eluser]Craig A Rodway[/eluser]
I don't understand why you are including other controllers directly in those controllers - I'm not sure that is the 'supported' method in CI or how you're extending them the way you are, but I suspect that is why. Normal controllers should extend Controller. http://ellislab.com/codeigniter/user-gui...llers.html
[eluser]AtlantixMedia[/eluser]
as I said, I use exactly the same method in other parts of the application and it works great. Adm extends Controller Main extends Adm Config extends Main Adm takes care of access level checks (permissions, etc) Main hold several common functions used by the Admin section and displays the admin main page Config takes care of specific configuration functions also, I get the same 404 error if Config extends Controller
[eluser]AtlantixMedia[/eluser]
forget about it. I fixed it. I did not delete the older version of admin.php which happened to have a function named config in it. so CI was reading that file instead of the one in the admin folder. it works as it should now. thanks anyway |
Welcome Guest, Not a member yet? Register Sign In |