I have an admin class Order that i used of 2 ways :
I created a custom route in my Order Admin with a Custom Action :
protected function configureRoutes(\Sonata\AdminBundle\Route\RouteCollection $collection)
{
$collection->add('sendOrderByMail', '{orderNumber}/sendOrderByMail');
}
And in my list template i have :
<a href="{{ admin.generateUrl('sendOrderByMail', {'orderNumber': object}) }}" class="btn btn-sm btn-default view_link"><i class="fa fa-envelope"></i> Send</a>
This is it's ok in my first case (A classic list), but in my ContactAdmin where i included the OrderAdmin in child i have this error :
An exception has been thrown during the rendering of a template ("unable to find the route acme_appli.admin.contact|acme_appli.admin.order.sendOrderByMail") in AcmeAppliBundle:Admin/Order:list_order.html.twig at line 11.
I don't know how to make this route ok.
Thanks
I think it's due to my cache. Now it's ok because i empty this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.