How to define frontend theme (non-admin) for a given node tab route? In my custom module I want to define a new tab associated with nodes. I have my own custom route file with the required definitions and a Links file to make sure the new route will be displayed as a node tab.

Everything works as planned, except that... The content of my custom page is wrapped in admin theme, not the website frontend theme.

I have found other threads where people ask the opposite question: 'how to enforce admin theme'? In those situations, it looks like that by setting '_admin_route: TRUE' on the route file will do the trick. More on this here: 

How to set admin theme for a route?

I thought I would be able to achieve what I want by setting '_admin_route: FALSE', but it doesn't work. Frontend theme doesn't show, admin theme still kicks in.

This is my modulename.route.yml file:

modulename.node.custom_tab:
  path: '/node/{node}/custom-tab'
  defaults:
    _title: 'Custom tab Content'
    _controller: '\Drupal\bti\Controller\MyTabController::pageContent'
  options:
    _node_operation_route: TRUE
    _admin_route: FALSE
    parameters:
      node:
        type: entity:node
  requirements:
    _permission: 'access content'
    _custom_access: '\Drupal\bti\Controller\MyTabController::access'


And this is my modulename.links.task.yml file:

entity.node.custom_tab:
  route_name: modulename.node.custom_tab
  base_route: entity.node.canonical
  title: 'Custom tab'
  weight: 50
  options:
    attributes:
      class:
        - 'my-custom-class'


So, to sum up: how can I make the new custom page in a node tab be displayed with theme defined for the frontend, not the admin theme? Thank you!

Edit 1



Is it possible that what I am looking for is the attribute '_theme' inside 'options'? It is marked as TODO here: https://www.drupal.org/docs/8/api/routing-system/structure-of-routes.
The _node_operation_route option respect the Use the administration theme when editing or creating content, if you want to explicitly disable admin theme for this node-related page don't use _node_operation_route

The _node_operation_route option overrides _admin_route https://api.drupal.org/api/drupal/core%21modules%21node%21src%21EventSubscriber%21NodeAdminRouteSubscriber.php/function/NodeAdminRouteSubscriber%3A%3AalterRoutes/8.8.x