Skip to content

@vijaycs85 /field.instance.default.yml
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
# field.instance.node.article.body.yml
default_value:
-
summary: ''
value: "<p>default 1</p>\r\n"
format: basic_html
field_type: text_with_summary
-
summary: ''
value: "<p>default 2</p>\r\n"
format: basic_html
field_type: text_with_summary
# Field instance defintion holds the top 'sequence' part.
# field.schema.yml
field.instance.*.*.*:
type: mapping
label: 'Field instance'
mapping:
default_value:
type: sequence
label: 'Default value'
sequence:
- type: field.[field_type].value
# Just type specific elements in data type defintion
# text.scheam.yml
field.text_with_summary.value:
type: mapping
label: 'Default'
mapping:
summary:
type: string
label: 'Summary'
value:
type: text
label: 'Body'
format:
type: string
label: 'Text format'
field_type:
type: string
label: 'Field type'
@vijaycs85
Owner

This way, we can have field.instance...*

field.instance.*.*.*:
  type: mapping
  label: 'Field instance'
  mapping:
    default_value:
      type: sequence
      label: 'Default value'
      sequence:
        - type: field.[field_type].value

and data type as

field.text_with_summary.value:
  type: mapping
  label: 'Default'
  mapping:
    summary:
      type: string
      label: 'Summary'
    value:
      type: text
      label: 'Body'
    format:
      type: string
      label: 'Text format'
    field_type:
      type: string
      label: 'Field type'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.