Symfony 4.3 - Overriding template issue the EasyAdminBundle's layout.html.twig case

978 Views Asked by At

I'm integrating EasyAdminBundle to my Symfony 4.3 app. No problems except the overring template part .. Fllowing the documentation, the template's overriding mechanism seems not work at all...

I'm forcely missing something ..

Example with the layout of EasyAdminBundle (easycorp/easyadmin-bundle v2.3.0):

Following the documentation my structure is like :

my-project/
├─ ...
└─ templates/
   └─ bundles/
      └─ EasyAdminBundle/
         └─ default/
            ├─ layout.html.twig

This layout.html.twig (path:templates/bundles/EasyAdminBundle/default/layout.html.twig) is a copy of the vendor/easycorp/easyadmin-bundle/src/Resources/views/default/layout.html.twig + some modifications

Cache:clear in debug and refresh navigator doesn't change the layout ( the effective one is still : vendor/easycorp/easyadmin-bundle/src/Resources/views/default/layout.html.twig )

Any idea ?

1

There are 1 best solutions below

0
On

After adding in easy_admin.yaml :

  design:
    templates:
      layout: 'bundles/EasyAdminBundle/default/layout.html.twig'

The layout is well used by the easyadmin views ...

But shouldn't be working without it ?