Get data from creationDialog


(Alex S) #1

Hey there,

i have an override for the default Neos.NodeTypes:Headline, so i can create my own title node with a creation dialogue, where i can select the size of it (h1 - h6).

Further i need to implement the selected option in the inspector, but i have no idea, how to get the data from the creation dialog to the inspector.

the .yaml looks like this:

'Neos.NodeTypes:Headline':
  abstract: true

'Vendor.Package:Content.Headline':
  abstract: false
  superTypes:
    'Neos.NodeTypes:Headline' : true
  ui:
    label: 'Titel'
    icon: 'icon-header'
    position: 500
    inspector:
      groups:
        headline:
          label: 'Headline'
          icon: 'icon-header'
          position: 900
    creationDialog:
      elements:
        headlineTitle:
          type: string
          ui:
            label: 'Titel'
            editor: 'Neos.Neos/Inspector/Editors/TextFieldEditor'
          validation:
            'Neos.Neos/Validation/NotEmptyValidator': []
        headlineType:
          type: string
          ui:
            label: 'Größe wählen'
            editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
            editorOptions:
              values:
                'h1':
                  label: 'h1'
                'h2':
                  label: 'h2'
                'h3':
                  label: 'h3'
                'h4':
                  label: 'h4'
                'h5':
                  label: 'h5'
                'h6':
                  label: 'h6'
          validation:
            'Neos.Neos/Validation/NotEmptyValidator': []
  properties:
    title:
      type: string
      ui:
        label: 'Titel'
        reloadPageIfChanged: true
        inspector:
          group: 'headline'
    type:
      type: string
      ui:
        label: 'Typ'
        reloadPageIfChanged: true
        inspector:
          group: 'headline'
        editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
        editorOptions:
          values:
            'h1':
              label: 'h1'
            'h2':
              label: 'h2'
            'h3':
              label: 'h3'
            'h4':
              label: 'h4'
            'h5':
              label: 'h5'
            'h6':
              label: 'h6'
        validation:
          'Neos.Neos/Validation/NotEmptyValidator': []

Any advice on how to put selected data to the inspector?