Brieuc
Brieuc

Reputation: 4114

Symfony2, Sonata : Remove an action from menu generated by a sonata bundle

I need to clean the admin side so it fits to the need of my client.

I'm using NewsBundle from Sonata, i actually don't need to use comments so i'd like to remove it from the admin side. At least from the menu. Is there a way to disable it in the config? I have not find any hints in the doc about this.

Here the specific area where i would like to not see it anymore :

Sonata menu

Sonata menu

By the way, the menu might be generated by KnpMenu

Upvotes: 1

Views: 1100

Answers (1)

devilcius
devilcius

Reputation: 1884

To customize the groups shown in the dashsboard and side menu, you need to edit your app/config/config.yml:

sonata_admin: dashboard: ... groups: sonata_blog: label: sonata_content label_catalogue: SonataNewsBundle icon: '<i class="fa fa-th"></i>' items: # - sonata.news.admin.comment - sonata.news.admin.post
sonata.admin.group.classification: label: sonata_classification label_catalogue: SonataClassificationBundle icon: '<i class="fa fa-sitemap"></i>' items: - sonata.classification.admin.category - sonata.classification.admin.tag - sonata.classification.admin.collection ...

Upvotes: 5

Related Questions