Create an admin route condition plugin or add generic "Current theme" options for admin and default theme

Created on 23 October 2024, about 2 months ago

Problem/Motivation

Now that admin paths are part of route definitions , it would be super useful to have an "Is administrative path" condition plugin in core!

The use-case is not to use path conditions like

admin/
admin/*

for cases where conditions are used.
This check isn't really feature-complete for admin paths and kind of ugly.

A bonus would be to also be able to match paths that are shown in the admin theme, based on the theme settings checkbox, for example node edit forms.

The current workaround is to use "Current theme" = "Gin" (Name of the admin theme)
An alternative to the suggested approach would be to add generic options to the "Current theme" condition:

  • <Default Theme>
  • <Administration Theme>

Conditions like this are frequently used for Blocks, Analytics modules, Contexts, etc. that should only act in the frontend, but never on admin pages.

Would be nice to discuss, which solution is the core maintainers favourite, before we start with the implementation.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

plugin system

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024