Welcome Guest, Not a member yet? Register   Sign In
Which route should I take?
#1

[eluser]TheFuzzy0ne[/eluser]
Hi everyone, and a happy new year to all!


It's stupid question time again. I am trying to design a simple bespoke admin control panel for a client, and I was wondering about how to have the default page for the control panel displayed.

Now, I know that CodeIgniter URLs are structure like so: mydomain.tld/controller/method/... But I'd like to break the control panel up into separate files (one for each admin module (forum, blog, user management etc...). Basically, the URLs will have this kind of structure.

mydomain.tld/admin/
mydomain.tld/admin/forums/
mydomain.tld/admin/blogs/
mydomain.tld/admin/users/

admin is just a directory, not a controller, the controllers are what follow, but I am wondering if there's any method other than using routing that will allow the first URL to produce a page (which will essentially be the index of the control panel. At the moment, mydomain.tld/admin/ just seems to redirect back to the homepage (which I thought was rather odd). Is there something I am missing here, or is routing the only answer?

Is there any reason why CodeIgniter should not look for a controller named "index", if the first parameter is an existing directory, and there is no controller with that name? I'm sure there is a good reason, but I'd be interested to know if I achieve what I want without routing.

Thanks in advance.


Messages In This Thread
Which route should I take? - by El Forum - 01-05-2009, 04:04 PM
Which route should I take? - by El Forum - 01-05-2009, 04:36 PM
Which route should I take? - by El Forum - 01-05-2009, 05:49 PM
Which route should I take? - by El Forum - 01-05-2009, 05:54 PM
Which route should I take? - by El Forum - 01-05-2009, 06:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB