Anton Smatanik
Anton Smatanik

Reputation: 584

Symfony EasyAdminBundle custom view

I'm starting with EasyAdminBundle for Symfony.

For default usage it is perfect, but what if I wanna create custom view and use for it custom controller?

Let's say I have a task to load json file, display all his data and user then can edit data and save them.

Ok, I have my own custom controller, no big deal, data are loaded, I have custom view, data are there. I can click on link in left menu and see them. Ok. But I can't put together this view with EasyAdminBundle. To show view in a this nice theme. What I have to extend?

'@EasyAdmin/default/layout.html.twig'?

Upvotes: 1

Views: 2346

Answers (1)

dbrumann
dbrumann

Reputation: 17166

Yes, if you want to extend the default layout you can extend EasyAdminBundle's layout.html.twig like this:

 {% extends '@EasyAdmin/default/layout.html.twig' %}

You can also check out the default templates e.g. for lists, but unfortunately the are a bit hard to read due to the high level of abstraction.

Upvotes: 2

Related Questions