Welcome Guest, Not a member yet? Register   Sign In
Folder structure for controllers
#6

[eluser]pan69[/eluser]
Figured it out. What you do is this:

Say you want have a section called 'Settings' and you want all the controllers for this section to live in a folder called settings/ inside you controllers/ folder. In the controllers folder create a folder called settings/. If you already have a controller called settings.php in your controller/ folder than this will clash. Move your settings.php controller (or create it) in the settings/ folder and rename it to your default controller as specified in the routes.php configuration file. Mine happens to be index.php

If you now browse to yourdomain.com/settings you will see that the default controller (index.php) inside the settings/ folder is executed. I assume that this technique will also work on deeper structures but I haven't tried that yet.

Hope this helps...


Messages In This Thread
Folder structure for controllers - by El Forum - 10-18-2008, 06:56 PM
Folder structure for controllers - by El Forum - 10-20-2008, 12:51 AM
Folder structure for controllers - by El Forum - 10-20-2008, 03:44 AM
Folder structure for controllers - by El Forum - 10-20-2008, 05:29 AM
Folder structure for controllers - by El Forum - 10-20-2008, 05:43 AM
Folder structure for controllers - by El Forum - 10-20-2008, 02:28 PM
Folder structure for controllers - by El Forum - 10-20-2008, 02:31 PM
Folder structure for controllers - by El Forum - 10-20-2008, 03:32 PM
Folder structure for controllers - by El Forum - 10-21-2008, 09:21 AM
Folder structure for controllers - by El Forum - 10-21-2008, 10:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB