Reputation: 4672
I added a new action (fooAction) in sonata admin bundle.
In list view there is an attribute which linked to newAction, but the its URL is like this : admin\bundle\entity\foo?id=17
fooAction works correctly ,But I want the Url to be RESTful like this: admin\bundle\entity\17\foo
what should I do ?
Upvotes: 2
Views: 855
Reputation: 4672
In configureRoutes
function,you must replace this :
$collection->add('foo');
to :
$collection->add('foo',$this->getRouterIdParameter() .'/foo');
Upvotes: 2