Support the documentation
This documentation was written by volunteers. Please help support our effort:
When creating new nodes, you have the possibility to ask for additional data during node creation. This data will be passed to nodeCreationHandlers.
The creation dialog supports most of the inspector editors, except of those that require to show a secondary inspector view. See Property Editor Reference for more details about configuring inspector editors.
For example, this functionality can be used to ask users for some data before creating an instance of the corresponding node:
'Some.Package:SomeNodeType': ui: group: 'general' creationDialog: elements: 'someElement': type: string ui: label: 'Some Label' editor: 'Neos.Neos/Inspector/Editors/TextFieldEditor' validation: 'Neos.Neos/Validation/NotEmptyValidator':  options: nodeCreationHandlers: documentTitle: nodeCreationHandler: 'Some\Package\NodeCreationHandler\SomeNodeCreationHandler'
You may register multiple nodeCreationHandlers per NodeType. Each nodeCreationHandler must implement NodeCreationHandlerInterface. It gets the newly created $node and the $data coming from the creation dialog.
See Neos\Neos\Ui\NodeCreationHandler\DocumentTitleNodeCreationHandler for example that is used to set the Document node's title and uriPathSegment as soon as the node is created.
Since Neos 5.1 it has become very easy to add elements to the Node Creation Dialog that represent properties of the corresponding node:
'Some.Package:SomeNodeType': # ... properties: 'someProperty': type: string label: 'Some Label' ui: showInCreationDialog: true
When using the showInCreationDialog feature, the editor options of the corresponding ui.inspector configuration is applied. If needed, the configuration can be overridden for the Node Creation Dialog like described above:
'Some.Package:SomeNodeType': # ... ui: creationDialog: elements: 'someProperty': ui: label: 'Overridden label' editorOptions: placeholder: 'Some placeholder only visible in the Node Creation Dialog' properties: 'someProperty': type: string label: 'Some Label' ui: showInCreationDialog: true
Using Images in the Node Creation Dialog
Most property editors just work out of the box when being used in the Node Creation Dialog. The following editors are an exception because they require a secondary view that is currently not supported by the Creation Dialog (see corresponding Bug ticket):
So when used in conjunction with the showInCreationDialog flag, these editors are disabled by default.
You can, however, override that behavior if you want to allow images to be uploaded (all features that require a secondary editor won't work and should be disabled):
'Some.Package:SomeNodeType': # ... ui: creationDialog: elements: 'someImageProperty': ui: editorOptions: disabled: false features: crop: false resize: false mediaBrowser: false properties: 'someImageProperty': type: 'Neos\Media\Domain\Model\ImageInterface' label: 'Some Label' ui: showInCreationDialog: true
There are community packages which can help to define the node creation in Fusion only: