Add ability to define defaults per layout

Created on 11 February 2024, 5 months ago
Updated 12 February 2024, 5 months ago

Problem/Motivation

I really like the approach used in ui_suite_bootstrap: https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/templ...

One single layout file, that simply loops the regions. This reduces the code so much, fantastic.

However, when defining a 3 column layout, I'd need something like this in the "rules" definitions:

 layout_options:
   layout_2col:
     defaults:
       layout:
         flex_align_items: "align-items-start"
       regions:
         col_1:
           col_md: "col-md-4"
         col_2:
           col_md: "col-md-4"
         col_3:
           col_md: "col-md-4"

The other way to set defaults is to look for existing values, set by the user, and only set defaults if that particular column setting is not set. Does this seem difficult to achieve, or am I missing something?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024