Welcome Guest, Not a member yet? Register   Sign In
passing url vars to controller
#1

(This post was last modified: 03-02-2015, 09:39 AM by geegee.)

i'm am very new to the whole mvc thing and i followed the CI tutorial.

that seems sort of straightforward.

but instead of calling an just a method with params how do you do something like this:

ww.example.com/index.php/categories/3/subcategories/4/items/5

so i want to show item number 5 form subcategory 4 belonging to category 3.

i have seen this in a ruby on rails application which also uses mvc and i wondered how that can be implemented with CI.

do i create a single method called "categories" which accepts " 3, 'subcategories' , 4, 'items' and 5" all as 5 seperate parameters or is there a better or efficient alternatieve to this?
Reply


Messages In This Thread
passing url vars to controller - by geegee - 03-02-2015, 09:38 AM
RE: passing url vars to controller - by ciadmin - 03-02-2015, 11:19 AM
RE: passing url vars to controller - by geegee - 03-02-2015, 12:14 PM
RE: passing url vars to controller - by cartalot - 03-06-2015, 05:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB