![]() |
Organizing Your Controllers into Sub-folders - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Organizing Your Controllers into Sub-folders (/showthread.php?tid=42549) |
Organizing Your Controllers into Sub-folders - El Forum - 06-10-2011 [eluser]GeXus[/eluser] I'm trying to organize into sub-folders, such as this: /controllers/checkout/cart.php (domain.com/checkout/cart) /controllers/checkout/default.php) (domain.com/checkout/) I'm having trouble with the default controller. It just doesn't work, i get a 404. I'd rather not setup routes for every default controller. Is there an alternative? Thanks! Organizing Your Controllers into Sub-folders - El Forum - 06-10-2011 [eluser]huzzi[/eluser] Use Modular Extensions - HMVC Search the forum for HMVC you'll find plenty of help. Organizing Your Controllers into Sub-folders - El Forum - 06-11-2011 [eluser]GeXus[/eluser] Hmm.. Is this the only way? Seems like it would be much simpler to simply define it in the routes Organizing Your Controllers into Sub-folders - El Forum - 06-11-2011 [eluser]GeXus[/eluser] This is from the CodeIgniter docs: Quote:Each of your sub-folders may contain a default controller which will be called if the URL contains only the sub-folder. Simply name your default controller as specified in your application/config/routes.php file My default controller is 'main', which is applied at the domain level. But from the above statement it sounds like it's referring to the sub-folders for controllers? Organizing Your Controllers into Sub-folders - El Forum - 07-25-2011 [eluser]Unknown[/eluser] i found this: http://firmy007.blogspot.com/2011/01/organise-controllers-in-codeigniter.html |