Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

Site builders are able now to configure view page displays to use the admin theme, regardless of the selected path. Previously, custom code was required to display a view page display with the admin theme that was not using a /admin/ path.

Before

In order to show a view page on an arbitrary route, /some/arbitrary/route, with the admin theme, a developer should have implemented a route alter subscriber and should have set the option _admin_route to TRUE for that route.

After

In the View UI, on a page display, at Page settings there's a new option Administration theme. Clicking on the link, a modal dialog pops-up, which exposes a checkbox, Use the administration theme, that site builders are able to check. See the attached screenshot.

Page setting UI

page setting ui

View theme popup

popup

Override Page setting UI

override page setting ui

Override View theme popup

override popup

Notes

  • A user should be granted with the view the administration theme permission in order to view a page with the admin theme.
  • When 'Administration theme' is 'No' contrib or custom modules may alter the route thus enforcing the page to use the admin theme.
AttachmentSize
PageSetting.png16.2 KB
Impacts: 
Site builders, administrators, editors
Module developers
Themers

Comments

adam_y’s picture

Will this work in Drupal 9?