Question About Data Structure and URLs |
[eluser]Colin Williams[/eluser]
The URI convention is 'controller/function/id', so that would translate in your example to 'product/category/name' So you see you have a Product controller, category method, and the third param is the name of the specific requested category. So no, you don't need a method for every single category. You can use routes to knock off the first part of the URI: Code: $route['category/(.*)'] = "product/category/$1"; Then, your URIs look like http://www.example.com/category/shoes |
Messages In This Thread |
Question About Data Structure and URLs - by El Forum - 08-17-2008, 12:02 PM
Question About Data Structure and URLs - by El Forum - 08-17-2008, 03:05 PM
|