0

I need to put a non-admin page/view inside my admin project build using Sonata Admin Bundle. Is there a correct or standard way to integrate an independent page within the admin, make it accesible trough the dashboard or menu, and display it using the layout and all styles of the whole backend admin (including form styles)?

The only way I imagine how to do it is create a custom controller, an make the views use the same twig layout of the admin, but I think of it as a "brute force" way.

Guillermo GutiƩrrez
  • 17,273
  • 17
  • 89
  • 116

1 Answers1

0

The way you stated seems the best one indeed. By taking a look at the dashboard page in the Admin, it is simply a controller rendering a template that extends the base_template of the sonata.admin.pool service.

You may then override the standard_layout.html.twig template to throughout the admin (don't forget to put it in the sonata_admin configuration as well) to customize the menus and add your link.

Hugo Briand
  • 1,683
  • 20
  • 27