M
M
Maxim Barulin2016-07-28 16:00:37
symfony
Maxim Barulin, 2016-07-28 16:00:37

How to override 'show' template in new version of sonata admin?

Good day to all! After some of the sonata updates, the redefinition of the template for displaying information stopped working. Searches have revealed that the root of the problem lies in the selection of the required block into a separate file (SonataAdminBundle:CRUD:base_show_macro.html.twig) and then importing the content into the show_helper variable. Previously, I just did this:

{% extends 'SonataAdminBundle:CRUD:base_show.html.twig' %}
{% block show_field %}контент{% endblock %}

now this option doesn't work. Tell me how to redefine a block inside a variable?
PS: the override is needed only for one entity, so the global one is not suitable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Krasavin, 2016-07-29
@Slavenin999

https://github.com/sonata-project/SonataAdminBundl...
Pretty strange change, for sure.
To summarize:

  • Profit
  • Didn't find what you were looking for?

    Ask your question

    Ask a Question

    731 491 924 answers to any question