I'm creating a custom menu in the administration for my module with multiple elements. This works fine by defining the forms, routes and menu links.

How can I create a page like /admin/config for my custom menu? Is it created somehow automatically or do I really need to create a custom page that lists all submenu items in a custom controller?


You can use SystemController::systemAdminMenuBlockPage as controller in the route of parent menu of module. Some like this:

  path: '/admin/mymodule'
    _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
    _title: 'My module overview'

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.