Modifying list view in Sonata

↘锁芯ラ 提交于 2019-12-08 03:36:26

问题


I'm using SonataAdminBundle for a Symfony project and I want to list entities not in table, but using vertical tabs. So, I want to have a tab, corresponding to each entity, so that pushing this tab opens fields selected by configureListFields at the right.

Is sonata capable of it?

Thanks for your help.


回答1:


As mentionned on the SonataAdmin documentation, it is possible override the default templates Sonata uses to render the admin UI:

sonata_admin:
    templates:
        list: SonataAdminBundle:CRUD:list.html.twig
        inner_list_row: SonataAdminBundle:CRUD:list_inner_row.html.twig
        ...

The list template is reponsible for rendering the whole table.
The inner_list_row is responsible for rendering a single row in this table.

Actually, list.html.twig extends base_list.html.twig
and list_inner_row.html.twig extends base_list_inner_row,
so you should probably by overriding those four.



来源:https://stackoverflow.com/questions/31747744/modifying-list-view-in-sonata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!