friendly urls? how to |
[eluser]metaprinter[/eluser]
i've been handed a completed site that the client now wants to 1. make the url's friendly right now i have: http://www.example.com/user/products/ContainersCat/1 buth they want http://www.example.com/user/products/boxes/metal http://www.example.com/user/products/boxes/cardboard etc... Can someone push me in the right direction on what i need to do here? ps. i have no idea what version of codeigniter this site was built on . thanks
[eluser]Slowcheetah[/eluser]
check http://ellislab.com/codeigniter/user-gui...llers.html
[eluser]Ngua Go[/eluser]
What's metal and cardboard? is products's Alias ? if alias then query with alias (not with ID)
[eluser]metaprinter[/eluser]
i'm not understanding where the url is being generated from i think is what my major problem is. Do i need to change something in the database or some php code? if the code, then where? in the product.php controller? in products.php i have this to start class Products extends Controller{ //constructor function Products(){ parent::Controller(); blah blah blah do i need another function like function boxes() { all my boxes stuff; } am i headed in the right direction?
[eluser]mi6crazyheart[/eluser]
@metaprinter If u want to change this url "http://www.example.com/user/products/ContainersCat/1" to like this... "http://www.example.com/user/products/boxes/metal" then u've to check... from where & how those parameters(ContainersCat & 1)are generating. Accordingly after that u can replace those parameters by new one(boxes/metal)...
[eluser]SpooF[/eluser]
A huge help when it comes to modifing your URLs http://ellislab.com/codeigniter/user-gui...uting.html |
Welcome Guest, Not a member yet? Register Sign In |