fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Routing question / issue #511

Closed polmartinez closed 13 years ago

polmartinez commented 13 years ago

For example: I've this routing configuration

return array( '_root_' => 'index', // The default route '_404_' => '404', // The main 404 route 'company/members(:any)' => 'company/members/index', '.*/index' => '404', );

In my Controller_Company_Members Controller, how I get the routing result ( in this case 'company/members/index')? when I using more parameters in the uri, for pagination for example.

Thanks

frankdejonge commented 13 years ago

Use the $1.

'company/members(:any)' => 'company/members/index/$1',

This is in the docs btw.

polmartinez commented 13 years ago

I's ok, but how I get the literal 'company/members/index' or 'company/members/index/$1' of the result of the routing? I use this string for create a menu and check the selected item. thanks

frankdejonge commented 13 years ago

it's the first param of your function :)

frankdejonge commented 13 years ago

If you need more help, hop by on irc: irc.freenode.net channel #fuelphp