![]() |
Routing vs Wrapper functions - 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: Routing vs Wrapper functions (/showthread.php?tid=15947) |
Routing vs Wrapper functions - El Forum - 02-19-2009 [eluser]meigwilym[/eluser] Hi, I'm building a site for my Rugby Club. The site is in two parts: info about the club (history etc), and info about the teams (scores, fixtures, match reports etc). So I have two controllers with functions like this: Code: Club Code: $route['team/first'] = 'team/info/1'; So my question is, which is the better way? Is there a difference? Many thanks, Mei Routing vs Wrapper functions - El Forum - 02-19-2009 [eluser]TheFuzzy0ne[/eluser] Personally, I prefer the second approach. It allows you to keep the routing within the controller. Other people might see things differently however. Routing vs Wrapper functions - El Forum - 02-19-2009 [eluser]meigwilym[/eluser] Me too. It also allows me to stay in the controllers directory, and saves me from having to mess about in the config files. Mei |