2

I want to make a custom view an editable entity.

By default dashboards showing links to edit entities `(/links, where controller is CRUDController::listAction)

It is looks like: enter image description here

But I need to show on main dashboard's page an enities's table like: enter image description here

I have block to display on dashbord(service).

services:
sonata.block.service.date:
    class: My\AuditBundle\Block\DateBlockService
    arguments: ['sonata.block.service.date',@templating,@sonata.admin.pool,@service_container]
    tags:
        - { name: sonata.block }

How can I show table into block? Thanks.

  • What about changing the [default route](https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/config/routing/sonata_admin.xml#L7) to redirect to that page? – 1ed Jan 16 '14 at 10:43
  • Good idea, but i want to have other `block` elements on my page – user1956092 Jan 16 '14 at 11:19

1 Answers1

0

You need to create a service to be injected in a block you can display on homepage

there is a script how to create a block in sonata admin homepage here :

SonataAdminBundle : display non crud (statistics)

and the sonata block bundle documentation :

http://sonata-project.org/bundles/block/master/doc/reference/your_first_block.html

once you have created your block you just need to override the base_list template into your custom block template :)

hope this will help

Community
  • 1
  • 1
Charles-Antoine Fournel
  • 1,713
  • 1
  • 25
  • 37