Welcome Guest, Not a member yet? Register   Sign In
Lengthy uri segments?
#1

[eluser]joshq[/eluser]
I have been working on my admin section (just started CI last week).
I have the admin/ section, which is login and main page
admin/add is to pick a section to add on to
admin/add/experience <-- how can i make "experience" its own function rather than checking inside the add() function? do i have to do if's or switch? or can i do it how i'm thinking
#2

[eluser]WanWizard[/eluser]
You can use routes to alter the URI routing (so admin/add/experience routes to admin/add_experience for example), you can make 'admin' a subdirectory and 'add' a controller in that subdirectory, or use the add() method as a dispatcher as you suggested.
#3

[eluser]joshq[/eluser]
[quote author="WanWizard" date="1275959913"]You can use routes to alter the URI routing (so admin/add/experience routes to admin/add_experience for example), you can make 'admin' a subdirectory and 'add' a controller in that subdirectory, or use the add() method as a dispatcher as you suggested.[/quote]
can you post me a sample of code for the routing?
thanks
#4

[eluser]danmontgomery[/eluser]
user guide




Theme © iAndrew 2016 - Forum software by © MyBB