Problem/Motivation

It is not currently possible to create a Page Layout Display for admin pages as /admin*.

Because we stop page layout to load in PageVariantSubscriber.php.

Proposed resolution

If we remove this line, this will create a problem on loading the admin theme for the admin page if the user as permission 'access administration theme'. Because then we don't load the admin theme and the frontend theme is missing.

This is probably a complex problem, and as a starter we should probably only support admin page layout for user that can not access the backend theme.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mogtofu33 created an issue. See original summary.

pdureau’s picture

Assigned: Unassigned » pdureau

That sounds fun, i will give a little try.

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Active » Needs review
Issue tags: +display_builder-1.0.0-beta
StatusFileSize
new14.57 KB
new12.13 KB

Hello,

It is not ready for merge yet, it lacks documentation update and automatic tests, but it is ready enough to be talked about :)

the proposal

Page layout config entities have a new "admin" boolean property (FALSE by default):
edit
list

When FALSE, everything work exactly as before:

  • the layout is forbidden on admin pages
  • front theme is used in the display builder

When TRUE:

  • the layout is applied only on admin pages
  • admin theme is used in the display builder

(by the way, this admin VS front theme logic is orthogonal to #3562060: Render UI with admin theme which is about the "chrome" of the display builder: toolbar, sidebars, menus.. here, we switch the full page indeed, but the goal is to switch what is rendered in the builder & preview panels)

To discuss

What do we do with SDC from themes in ComponentLibrary and ComponentLibraryDefinitionHelper? My proposal:

  • SDC from front theme and parents: only available when FALSE
  • SDC from admin theme and parents: only available when TRUE
  • SDC from neither front nor admin themes: never available

Let's talk