07-03-2009, 01:06 PM
[eluser]Kenneth Allen[/eluser]
OK, that seems to make sense.
How does one implement the logic to handle a URL such as where the intent is to view the information associated with a specific team within a specific program or division within a specific season? Which controller or controllers need to be written receive the URL? It is possible to pass symbolic names rather than internal ID numbers, so the URL might look like the following? Is it as simple as checking the parameter and if it is an integer presume that it is an ID and otherwise that it is a key value?
I do not see how CI would support a hierarchy of information such as that in the URLs shown, but it even if the user is forced to traverse links from page to page, the information has to be passed. So the shortest URL might display a list of seasons, and clicking on one of those would display information about that season, which would be in its own controller. But what happens when on clicks on a program within that season?
I tried adding the following line to my routes.php file, but when I then invoke the URL above, instead of getting the 404 page I just get a blank page!I am new to CI and while I have figured a number of issues out, I remain unfamiliar with the definitions required for routes to work properly.
OK, that seems to make sense.
How does one implement the logic to handle a URL such as
Code:
http://my_site.com/schedule/season/1/program/2/Team/3
Code:
http://my_site/schedule/season/Summer2009/program/Juniors/team/Bucaneers
I do not see how CI would support a hierarchy of information such as that in the URLs shown, but it even if the user is forced to traverse links from page to page, the information has to be passed. So the shortest URL might display a list of seasons, and clicking on one of those would display information about that season, which would be in its own controller. But what happens when on clicks on a program within that season?
I tried adding the following line to my routes.php file, but when I then invoke the URL above, instead of getting the 404 page I just get a blank page!
Code:
$route['season/(:any)/program/(:any)/team/:any')] = 'team/info/$1_$2_$3'