Welcome Guest, Not a member yet? Register   Sign In
Again. Controller in Sub-folders (new way?)
#2

[eluser]tonanbarbarian[/eluser]
Have you tried this without the routes... because the loader will search in a single depth sub folder for a matching controller
The only time we have found an issue is if you want more than 1 sub folder depth
Code:
application/controllers/main/admin/admin.php
application/controllers/main/admin/user.php
will not work.

Or if you try to do something tricky like
Code:
application/controllers/main.php
application/controllers/main/admin.php
will also not work. This is because you have a controller at the root level the same name as a sub folder

but just to have
Code:
application/controllers/main/main.php
application/controllers/privacy/privacy.php
working requires no effort

It is also unclear from your example why you are putting the controllers into sub folders. I assume there are going to be multiple controllers under the main sub folder and also under the privacy subfolder.
If not then just do not use subfolders.


Messages In This Thread
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 09:29 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:14 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:29 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 10:59 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:03 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:38 PM
Again. Controller in Sub-folders (new way?) - by El Forum - 01-02-2008, 11:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB