Problem/Motivation

3 issues:

  • As soon as display_builder_page_layout is enabled it takes over native display which may result in a "broken" display until it is configured, instead of opt-in
  • we can manage only one "page layout" config: display_builder.page_display.page_layout.yml
  • We have a soft dependency to https://www.drupal.org/project/page_manager for allowing page management, but this module is overkill for our needs and we want to avoid contrib dependencies

Proposed resolution

Both can be resolved by introducing our own page management:

  • we add a "PageLayout" (page_layout) config entity in display_builder_page_layout
  • when we install the module nothing happens on front, but it is now possible to add a page layout entity in /admin/structure/page-layout
  • a page layout config entity is merging page_manager's Page and PageVariant entities, with those properties:
    • entity_config_id: the ID of the Display Builder config entity last used
    • conditions: and attachment of condition plugins this config entity will be the page layout only if those conditions are met (like "Page access" in "Selection criteria " in page_manager's PageVariant and like "visibility" in Block config entities)
    • sources: an UI Patterns source plugins tree

Those PageLayout config entities will be orderable (like) so, on page rendering we load them one by one and use the first were all condition plugins are met.

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

pdureau created an issue. See original summary.

pdureau’s picture

Title: [1.0.0-beta1] Add proper page management » Add proper page management
Issue tags: +display_builder-1.0.0-beta
pdureau’s picture

Also, let's replace

  context_requirements: ['is_display_builder_page_layout'],

by a proper, display builder agnostic, page context which could be implemented and managed in UI Patterns 2's side.

pdureau’s picture

Category: Task » Feature request
pdureau’s picture

Let's try to cover the feature scope before reaching beta

pdureau credited mogtofu33.

pdureau’s picture

Assigned: Unassigned » pdureau
Issue summary: View changes

Discussed with Jean: We don't touch the page_manager for now (let's create an follow-up issue for Beta phase) and just move settings to config entity in this issue.

pdureau’s picture

Status: Active » Needs work

Last task remaining: better switch in ThemeRegistryAlter

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs work » Needs review

CI pipeline running. Must be OK

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

  • mogtofu33 committed 7f0a4a6f on 1.0.x authored by pdureau
    Issue #3529737 by pdureau, mogtofu33: Add proper page management
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.