Problem/Motivation

Embed a pattern A as a child of an other pattern B, have the effect to have all settings value of pattern A empty.

Steps to reproduce

Create a pattern Heading for example:

heading.ui_patterns.yml

heading:
  label: 'Heading'
  settings:
    title_tag:
      type: select
      label: 'Title tag'
      default: h2
      options:
        h1: H1
        h2: H2
        h3: H3
        h4: H4
        h5: H5
        h6: H6
        h7: H7
        span: span
        div: div
  fields:
    title:
      type: text
      label: 'Title'
      description: 'The content.'
      preview: 'I am a title'

pattern-heading.html.twig

<{{ title_tag|default('span') }}> {{ title }} </{{ title_tag|default('span') }}>

I am using ui_patterns_field_group,
When I set H7 in a root pattern, it is well display in tag BUT as a child of an other pattern settings are empty (fields are ok).

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

julien tekrane created an issue. See original summary.

julien tekrane’s picture

julien tekrane’s picture

julien tekrane’s picture

Issue summary: View changes

julien tekrane’s picture

My fix is working using ui_patterns_field_group. i have to work the tests

julien tekrane’s picture

Status: Active » Needs work
julien tekrane’s picture

Title: Nested patterns have empty options » Nested patterns have empty settings
julien tekrane’s picture

Issue summary: View changes