0

I'd like to render the links to user management and ACL editing on my SonataAdmin Dashboard. What do I need to add to sonata_block section? Also, what are these 'cms' and 'admin' contexts?

sonata_block:
    default_contexts: [cms]
    blocks:
        # Enable the SonataAdminBundle block
        sonata.admin.block.admin_list:
            contexts:   [admin]
        # Your other blocks
        sonata.user.block.menu: ~    # used to display the menu in profile pages
        sonata.user.block.account: ~ # used to display menu option (login option)
        sonata.block.service.text: ~
        sonata.block.service.rss: ~
        sonata.block.service.imagesize:
            contexts: [admin]
    groups:
        admin.group.content:
            label: My Label
            label_catalogue: SonataAdminBundle
            items:
                - sonata.admin.????
codecowboy
  • 9,835
  • 18
  • 79
  • 134

1 Answers1

1

Please note, the cms context will be renamed into sonata_page_bundle to be more appropriate.

Each block can be defined in a specific context (ie, an admin related block does not need to be added as a cms block).

So if we set a context to a block, the default value will not be applied and so the block will be not listed in the SonataPageBundle or any other bundles using this context.

Now, if you want to add content into the dashboard, you have some options: - overwrite the dashboard template so you can fine tune the overall layout and add link to the user management. - create a block and add it to the block configuration of the sonata_admin section.

You can create a new block by following the BlockBundle tutorial available at: http://sonata-project.org/bundles/block/master/doc/reference/your_first_block.html

rande
  • 656
  • 4
  • 5
  • thanks. I remember in an earlier version of SonataAdmin that blocks relating to user management were pre defined and you could just add them via the config files. Is that no longer the case? – codecowboy May 04 '14 at 19:38
  • also, how do I access the ACL editor? http://sonata-project.org/bundles/admin/2-2/doc/_images/acl_editor.png – codecowboy May 04 '14 at 19:40
  • is there not some way to add the user management as a list item within a group (see updated config in question) ? – codecowboy May 19 '14 at 14:14