Sonata Admin - No Header

2019-05-30 10:19发布

I extends "SonataAdminBundle::standard_layout.html.twig and it show me admin theme without header/menu. After the debug code "admin_pool" is not defined I passed from admin_pool from the controller but still not defined.

Can you please tell me what am I missing?

1条回答
手持菜刀,她持情操
2楼-- · 2019-05-30 10:31

I solved header's problem myself using below code

$admin_pool = $this->get('sonata.admin.pool');

return $this->render('ProjectBundle:Controller:page.html.twig', array('admin_pool' => $admin_pool));

查看更多
登录 后发表回答