Organizing Your Controllers into Sub-folders |
[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!
[eluser]huzzi[/eluser]
Use Modular Extensions - HMVC Search the forum for HMVC you'll find plenty of help.
[eluser]GeXus[/eluser]
Hmm.. Is this the only way? Seems like it would be much simpler to simply define it in the routes
[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?
|
Welcome Guest, Not a member yet? Register Sign In |