How can i only get the body contents of easyAdmin bundle twigs

时间:2019-04-08 13:08:08

标签: symfony twig easyadmin

I want the functionality of EasyAdmin Bundle but i just want the body tag cause i have my own template and i can't seem to be able to extract only the contents of the body tag.

i tried the checking out the code but it keeps referencing other twigs i just want what's inside the body block in html and css

{% extends 'baseback.html.twig' %}

{% block body %}


{% endblock %}

enter image description here

this is what i need from the bundle code."

1 个答案:

答案 0 :(得分:1)

如果您查看EasyAdmin源代码:

https://github.com/EasyCorp/EasyAdminBundle/blob/master/src/Resources/views/default/layout.html.twig

您会看到(variable name):(value1) /(value2)块包含所有内容,包括菜单和内容; body所在的位置是您想要的。

现在在文档中:

https://symfony.com/doc/master/bundles/EasyAdminBundle/book/edit-new-configuration.html#overriding-the-default-templates-using-symfony-s-mechanism

您可以在自己的项目中覆盖上面的content以仅呈现所需的内容。

相关问题