How do I change the Sonata Project link in SonataAdmin?

I have a problem with SonataAdminBundle, I don't know how to change the "Sonata project" link in the left pane.

I have "My Title" + one image and underneath there is a "Sonata Project".

How can I change this?


source to share

1 answer

To customize the content of the block under Sonata Admin (by default, this is the text sonata project link), you need to modify your file app/config/config.yml by adding the following:

    # ...
        # Override default template
        layout: AcmeAdminBundle::standard_layout.html.twig


Then create a file standard_layout.html.twigin the directory src/Acme/AdminBundle/Resources/views:

{# src/Acme/AdminBundle/Resources/views/standard_layout.html.twig #}
{% extends 'SonataAdminBundle::standard_layout.html.twig' %}

{% block side_bar_after_nav %}
    <p class="text-center"><a href="{{ path('your_route') }}">Route name</a></p>
{% endblock %}


This will override the default content of this block .

If you don't want to put the file in a package, use this path in app/config/config.yml : layout: "::standard_layout.html.twig"

ant put the file in app/Resources/views.

And if you want to change the name of Sonata Admin add it to your app/config/config.ymlfile:

    # ...
    title: My Name




All Articles