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 agree to our terms of service, privacy policy and cookie policy

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