Welcome Guest, Not a member yet? Register   Sign In
Organizing Your Controllers into Sub-folders
#1

[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!
#2

[eluser]huzzi[/eluser]
Use Modular Extensions - HMVC

Search the forum for HMVC you'll find plenty of help.
#3

[eluser]GeXus[/eluser]
Hmm.. Is this the only way? Seems like it would be much simpler to simply define it in the routes
#4

[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?
#5

[eluser]Unknown[/eluser]
i found this:

http://firmy007.blogspot.com/2011/01/org...niter.html




Theme © iAndrew 2016 - Forum software by © MyBB