1

Sorry if it's so obvious, but can I put an admin class in the menu as a simple button instead of a dropdown, without hardcoding it in the overwritten template?

To put a dropdown, I put in config.yml:

sonata_admin:
    dashboard:
        groups:
            xxx.admin.product:
                label: xxx.admin.product
                label_catalogue: XxxBundle
                item: sonata.admin.product

I see "item" and "items" does the same, so I have no idea how to do it. Thx.

zeykzso
  • 493
  • 2
  • 9

1 Answers1

2

I do not know if it is possible in this way, but instead of overriding template, you can use Sonata Block Bundle to create you custom block and configure it then from config. Check this question for detailed information

Community
  • 1
  • 1
pomaxa
  • 1,740
  • 16
  • 26
  • yeah, well, I know this solution, but it's a shame I have to write so much code for a simple button:(.. – zeykzso Apr 30 '14 at 15:40
  • @hombee if it is just for one project, - then it is simpler to override template. And if you don't like to hardcode menu, - you can override it only with one additional twig function, which can return any generated HTML you need. btns/link/etc – pomaxa Apr 30 '14 at 16:03
  • My problem is that then it won't be easily configurable and modifyable, like it's supposed to be:(. – zeykzso Apr 30 '14 at 16:08