Simple routing problem |
[eluser]Aidy[/eluser]
I have followed the use guide examples and have set up a route Code: $route['Food-Safety/Level-2-Award-in-Food-Safety-in-Catering-CIEH'] = "courses/course/30/300"; The route seems to be loading loading the controller but without the last 2 segments eg courses/course. The controller works fine for www.somedomain.com/courses/course/30/300 here is my controller code. Code: function course() Any help appreciated?
[eluser]BrianDHall[/eluser]
Try this: Code: function course($cat_id = null, $co_id = null ) Then get rid of accessing by segment. Otherwise you need to check out rsegment() as you are using routing to change the uri segments: http://ellislab.com/codeigniter/user-gui...s/uri.html
[eluser]Aidy[/eluser]
Hey Brian Thats Great, thanks alot. I should have checked that section of the user guide. |
Welcome Guest, Not a member yet? Register Sign In |