How to create tabs in admin configuration page in drupal 8

By Arun AK, 21 May, 2017

In drupal 8 it's quite easy to create tabs in admin configuration pages. Instead of writing junk of codes we can do it easily by define settings inside a simple YML config file.

Create mycustommodule.links.task.yml file and put it inside your module's root directory and define your configuration like below.

mycustommodule.settings:
  title: 'My Custom Module Settings'
  route_name: mycustommodule.mycustommodule_settings
  base_route: author_pane_popup.settings

mycustommodule.list:
  title: 'My Custom Module Settings List'
  route_name: mycustommodule.list
  base_route: mycustommodule.settings

Before configuring tabs you must have defined your route and links in mycustommodule.routing.yml and mycustommodule.links.menu.yml.