Jeremy
Jeremy

Reputation: 554

Sonata Admin Panel Input Field

Is there a way to add an input field to the default sonata admin panel in symfony 2?

Has anyone done this before? I can't seem to find any documentation.

Thanks.

Upvotes: 0

Views: 158

Answers (1)

Muhammed
Muhammed

Reputation: 1612

When using Symfony you can override any twig template. This is the file you are looking for:

  • vendor/sonata-project/admin-bundle/Resources/views/Block/block_admin_list.html.twig

1) Copy above file into your Resources under appropriate folder.

2) Edit config.yml:

sonata_admin:
    templates:
            list_block: AppBundle:Sonata:block_admin_list.html.twig

Clear cache, and you are set.

You could also create your own blocks for Dashboard: https://sonata-project.org/bundles/admin/master/doc/reference/dashboard.html

Upvotes: 2

Related Questions