Problem/Motivation

I encountered a need to set default classes for some regions in my templates but also needed to allow site builders to change these classes via the Display Suite UI for custom classes.

Proposed resolution

Add support for default settings for classes from the layout settings in layouts.yml. The attached patch uses the "additional" settings from the layout plugin to use classes from the settings.classes of the layout if there are no classes specified in the configuration.

example layout:

my_ds_layout:
  ...
  regions:
    header:
      label: Header
    main:
      label: Main
    footer:
      label: Footer
  settings:
    classes:
      main:
        col-12: col-12
        col-sm-6: col-sm-6

Comments

malcolm_p created an issue. See original summary.

malcolm_p’s picture

malcolm_p’s picture

Title: Use default for classes settings from layouts.yml » Use default classes settings from layouts.yml
malcolm_p’s picture

Updated patch to allow default layout classes as well.

malcolm_p’s picture

Status: Active » Needs review

  • swentel committed 2435b23 on 8.x-3.x authored by malcolm_p
    Issue #2912577 by malcolm_p: Use default classes settings from layouts....
swentel’s picture

Status: Needs review » Fixed

committed and pushed, thanks!

Status: Fixed » Closed (fixed)

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