Could render_theme have options for Default / Admin instead of, or in addition to the actual theme names

Created on 28 August 2024, 3 months ago

Problem/Motivation

As I work on the SEO recipe for Drupal CMS, I am creating config actions that create a field, then add it to all the content types of a site.

When I use the setComponent(s) config action, placing the field instance in the entity_form_display, I need to define settings.render_theme.

config:
  actions:
    core.entity_form_display.node.*.default:
      setComponents:
        -
          name: field_seo_analysis
          options:
            type: yoast_seo_widget
            weight: 18
            region: content
            settings:
              render_theme: olivero
              render_view_mode: default
              edit_title: 0
              edit_description: 0
            third_party_settings: {  }

If I leave it null, which is allowed, the form selects the first theme alphabetically, which in a default install is Claro.

We had a similar situation come up creating a config action to place blocks. As recipe creators we don't necessarily know the name of the them the recipe is going to be applied to. But what we do know is that there is a set Default theme and a set Admin theme.

That action is documented here:
https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/do...

This is definitely a low priority feature request, but I wanted to capture it to see if it would be possible. It would make configuring this module in recipes all the more safer.

Thanks!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

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

Comments & Activities

Production build 0.71.5 2024