move CustomThemeNegotiator out of tests and into system module

Created on 23 April 2016, about 9 years ago
Updated 6 May 2025, 11 days ago

AFAICT, there's no D8 equivalent of the 'theme callback' property of hook_menu() items on D7.

But... there is, it's CustomThemeNegotiator. But it's in a test module, theme_test.

It provides a '_custom_theme' property to routes, which lets you specify the theme:

theme_test.function_template_override:
  path: '/theme-test/function-template-overridden'
  options:
    _custom_theme: 'test_theme'
  defaults:
    _controller: '\Drupal\theme_test\ThemeTestController::functionTemplateOverridden'
  requirements:
    _access: 'TRUE'

It would be useful to move this into system module, so it can be used.

Feature request
Status

Postponed: needs info

Version

11.0 🔥

Component

system.module

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024