4

What needs to be done:

Newly created fields in any content type should go to the hidden region of the DS Layout.

Short background:

In our project we use the Display Suite module, and we have the following custom layout that is used for all the content types.

project_layout:
  label: Project layout
  category: Display Suite
  class: '\Drupal\ds\Plugin\DsLayout'
  type: partial
  template: ds_layouts/project_layout/project_layout
  icon: ds_layouts/project_layout/project_layout.png
  regions:
    header:
      label: Header
    left:
      label: Left
    middle:
      label: Middle
    right:
      label: Right
    comments:
      label: Comments
    footer_top:
      label: Footer top
    footer_middle:
      label: Footer middle
    footer_bottom:
      label: Footer bottom

`

If a new field is added it always goes to the header region.

What I have tried that does NOT work:

  1. Setting

    default_region: hidden

2.Setting

default_region: disabled
  1. Creating new region called test and placing it before the header region.

In that scenario, the new fields go to the "test" region. In a way this is a workaround, but there should be better solution.

1 Answer 1

-2

Have you tried ds_hidden as region_name?

UPDATE, or none (still guessing).

2
  • I tried adding default_region: ds_hidden , but it doesnt work Sep 5, 2022 at 8:32
  • Sorry - bad guess then..
    – rémy
    Sep 5, 2022 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.