symfonysonata-adminsymfony-sonata

Disable search in Sonata Admin


How can I disable the search feature in Sonata Admin Bundle, in order to not show the search input field in the upper menu?


Solution

  • You need to override the standard_layout.html.twig template and overwrite the block sonata_top_bar_search with nothing in it. That will make it disappear.

    sonata_admin:
        templates:
            layout:  YourBundle::layout.html.twig
    

    Read more here about customizing templates.