2
如何在新版本中覆蓋「演示」模板?之前我在模板庫中的模板擴展:如何在新版本奏鳴曲「顯示」模板管理員
{% extends 'SonataAdminBundle:CRUD:base_show.html.twig' %}
,並覆蓋
{% block show_field %} my content {% endblock %}.
但現在這行不通。我現在需要擴展哪些模板?
PS我想只有一個實體覆蓋模板,這樣,全球覆蓋不適合我
沒有這個不行,因爲base_show_macro不能擴展base_show。 base_show_macro.html.twig在變量show_helper [代碼](https://github.com/sonata-project/SonataAdminBundle/blob/3.x/Resources/views/CRUD/base_show.html.twig#L14)中顯示並呈現在一些地方[代碼](https://github.com/sonata-project/SonataAdminBundle/blob/3.x/Resources/views/CRUD/base_show.html.twig#L59)。在此塊show_field在base_show [code](https://github.com/sonata-project/SonataAdminBundle/commit/fd1a1596f86bfb4afdafe9767efaa4c787bba6a5#diff-0cb97fb894cd897069cbade4ba839c97L36) –