I'm trying to retrieve a parameter from the url. I tried different things with routes but I'm stuck.
I did the following in my route file :
'newRouteName/(:any)' => 'controllerName/$1'
On my action_index method I want to be able to get the parameter from the url so I declared it like this : public function action_index($param) {echo $param;} But this is not working.
If I remove the parameters, the routing is well working but I need to get the parameter from the url.
Any additional parameters are passed to the method, so that should work just fine. Are you sure you don't have a routing issue, because that route doesn't route to 'action_index', it routes to $1.
Thank you very much it soled my issue. I thought if I did not mentionned the method name, the default action_index was executed but I was wrong. Cheers ! Philippe