XF 2.0 Setting up routes in such fashion /Controller/action/1/12/32

ludak

Active member
Maybe I have not figured out how to do this and its already in there.

Trying to set up a route that will send several things to the controller using ParameterBag. Is there a way without using GET to send multiple values.

For example if I have route

users/:int<user_id>/:int<group_id>/

I see the link as something/users/1/2/action

When I click to save (POST), in paramter bag I am only seeing user_id parameter posted. I can create a link to use the GET, but wondering if I am overlooking something basic here.

Thanks,
 
GET parameters are transmitted via URL and can be accessed through the parameter bag. POST parameters are only transmittes from post method forms (and post ajax) and can be accessed via the input filter.

If group_id doesn't show up in the Parameter bag, make sure it's in the url in the first place.
 
Thanks,

it is...when I set it up, I see users/10/34/view (10 being a userId, and 34 being a groupid), however in the controller, when I look at the parameterBag I only see userID in the $params. What am I doing wrong?
 
Top Bottom