{"action":"created","issue":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/151","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/151/comments","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/151/events","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/151","id":59457420,"number":151,"title":"Allowed grouping entities for a 2-level tree in nav","user":{"login":"Pierstoval","id":3369266,"avatar_url":"https://avatars.githubusercontent.com/u/3369266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pierstoval","html_url":"https://github.com/Pierstoval","followers_url":"https://api.github.com/users/Pierstoval/followers","following_url":"https://api.github.com/users/Pierstoval/following{/other_user}","gists_url":"https://api.github.com/users/Pierstoval/gists{/gist_id}","starred_url":"https://api.github.com/users/Pierstoval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pierstoval/subscriptions","organizations_url":"https://api.github.com/users/Pierstoval/orgs","repos_url":"https://api.github.com/users/Pierstoval/repos","events_url":"https://api.github.com/users/Pierstoval/events{/privacy}","received_events_url":"https://api.github.com/users/Pierstoval/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-02T09:34:27Z","updated_at":"2015-05-01T10:23:48Z","closed_at":"2015-03-30T13:06:28Z","pull_request":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/151","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/151","diff_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/151.diff","patch_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/151.patch"},"body":"If you don't specify anything, entities are listed normally.\r\n \r\nIf you add a `group` parameter to your entity configuration in EasyAdmin, then all `grouped` entities will be sorted in a tree-like structure.\r\n\r\nLike this:\r\n\r\n```yml\r\n# app/config/config.yml\r\neasy_admin:\r\n    entities:\r\n        Posts:\r\n            groups: Blog\r\n            class: AppBundle\\Entity\\Post\r\n        Pages:\r\n            groups: Cms\r\n            class: AppBundle\\Entity\\Page\r\n        \"Config\":\r\n            class: AppBundle\\Entity\\Config\r\n```\r\n\r\nLike this:\r\n![capture d ecran 2015-03-02 a 13 03 53](https://cloud.githubusercontent.com/assets/3369266/6440384/ab1fdcfc-c0dc-11e4-9f54-78acda773c6e.png)\r\n\r\nFor now there is no show/hide feature, but I think it should be necessary if there are more than 10 entities in the whole back-end, what you think?"},"comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments/98094895","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/151#issuecomment-98094895","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/151","id":98094895,"user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T10:23:48Z","updated_at":"2015-05-01T10:23:48Z","body":"@romaricdrigon I understand that you may need this feature and I also understand the urge for it. However, adding this option looks like a temporary solution and we prefer to introduce the new `menu` option to provide more flexibility and doing it in a better way.\r\n\r\nIn any case, I've just released the new 1.4.0 version of the bundle and it allows to customize any backend element very easily. Read [this new documentation](https://github.com/javiereguiluz/EasyAdminBundle/blob/master/Resources/doc/10-customizing-design.md#customize-the-templates-of-the-backend) to learn how it works. In your particular case, you can override the default.html.twig to just redefine the `header_menu` block to create your own menu.\r\n\r\nThe simplest way to do it is to create the following template:\r\n\r\n```\r\n{# app/Resources/views/easy_admin/layout.html.twig #}\r\n{% extends '@EasyAdmin/default/layout.html.twig' %}\r\n\r\n{% block header_menu %}\r\n    ... your custom menu here ...\r\n{% endblock %}\r\n```"}}