SonataAdmin, add menu on left

Clément Andraud picture Clément Andraud · Aug 5, 2014 · Viewed 10.6k times · Source

I'm working on Symfony2 and SonataAdminBundle.

I need to know how to add a menu in the left part of my dashboard ? Like in the screen :

enter image description here

I need to have the Dashboard block in the left part on the page (in dark-grey on my screen).. how can i do that ?

you can see on the demo of SonataAdmin http://demo.sonata-project.org/admin/dashboard, login admin, apssword admin

Answer

hc100 picture hc100 · Dec 5, 2014

http://blog.eike.se/2014/03/custom-page-controller-in-sonata-admin.html

this post helped me.

extend template

vendor/sonata-project/admin-bundle/Resources/views/standard_layout.html.twig

override block

{% extends 'SonataAdminBundle::standard_layout.html.twig' %}
{% block side_bar_after_nav %}
YOUR CUSTOM MENU
{% endblock %}