Symfony2-覆盖模板bundle



我想覆盖默认的SonataAdmin模板。

我在Namespace/bundle/resources/views中创建了一个standard_layout.html.twig(相同的结构,相同的文件名,相同的内容)

我把源模板的所有内容都复制到了我的目标模板中,我只是编辑了目标模板的一部分。。。。没有

谢谢你的帮助再见

您有bundle heritance的解http://symfony.com/doc/current/cookbook/bundles/inheritance.html这不仅允许覆盖模板,还允许覆盖方法。

或者你有http://symfony.com/doc/2.0/book/templating.html#overriding-只关注模板的捆绑模板。

最后,您可以尝试创建:

app/Resources/SonataAdminBundle/views/CRUD/base_show_field.html.twig

最新更新