![]() |
Routes Trouble - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Routes Trouble (/showthread.php?tid=51259) |
Routes Trouble - El Forum - 04-26-2012 [eluser]xtremer360[/eluser] So I decided to change my titles controller so that there's a edit and add function inside of the titles controller that way they dont' have separate controllers when they are in fact methods. So I have: kansasoutalwwrestling.com/kowmanager/titles/titles - list of titles kansasoutalwwrestling.com/kowmanager/titles/titles/add - addnew form kansasoutalwwrestling.com/kowmanager/titles/titles/edit/$id - edit form I don't have any routes set up so far for this. For some reason though I"m getting the same page for both of these page. kansasoutalwwrestling.com/kowmanager/titles/titles/add - addnew form (right link url) kansasoutalwwrestling.com/kowmanager/titles/add - addnew form I need a route so that it'll show the correct url if the add method is accessed. Also I need to set up a route so that if the correct edit link is accessed it sees the id attached to the end of the url and it'll accept it so that I can do a my database query to get the title data. Here's the routes I've tried but for some reason don't work. $route['titles/titles/edit/(:any)'] = 'titles/titles/edit/$1'; $route['titles/titles/add'] = 'titles/titles/add'; $route['titles/titles'] = 'titles/titles'; $route['titles'] = 'titles/index'; Just wanted to comment that I'm also using wiredesignz modular separation framework if that matters. Routes Trouble - El Forum - 04-26-2012 [eluser]Aken[/eluser] How is your controller set up? Why do you have titles repeated in the URL (seems unnecessary)? Please make sure to use the [ code ] tags for formatting. Routes Trouble - El Forum - 04-26-2012 [eluser]xtremer360[/eluser] kansasoutlawwresstling.com/kowmanager/titles(module)/titles(controller) |