diff --git a/README.md b/README.md index 46a2e05..4dde9f9 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ automatically creating helpful child nodes and making useful modifications to no properties when creating new nodes in the Neos UI. In contrast to child nodes that are defined in the regular node type definition -(they cannot be removed by the editor), all modifications that are made when a +(which cannot be removed by the editor), all modifications that are made when a template is applied can be changed or removed by the editor. The desired node structure is defined in a declarative way in the NodeTypes.yaml -under the path "options.template". +under the path `options.template`. ## TL;DR @@ -39,7 +39,7 @@ to the main content collection of all pages that are created via the UI: ## Using the node creation dialog -The Neos React UI comes with a configurable node creation dialog. You can access +The Neos UI comes with a configurable node creation dialog. You can access the data entered in the node creation dialog in your node templates using EEL queries. You could let the editor choose between different dummy texts like this: @@ -71,6 +71,32 @@ You could let the editor choose between different dummy texts like this: text: '${"

" + data.dummyText + "

"}' ``` +You can also access data from the node creation dialog if you use the +`showInCreationDialog` feature: + +```yaml +'Some.Package:SomeNodeType': + # ... + properties: + 'firstName': + type: string + label: 'First Name' + ui: + showInCreationDialog: true + 'lastName': + type: string + label: 'First Name' + ui: + showInCreationDialog: true + 'cardTitle': + type: string: + label: 'Card Title' + options: + template: + properties: + cardTitle: '${"

" + data.firstName + " " + data.lastName + "

"}' +``` + ## Conditions and loops ### Conditions @@ -169,6 +195,16 @@ values are not available. As ``withContext`` is evaluated before ``when`` and `` access context variables from ``withContext`` in ``withItems`` at the same level – but not the other way around. +If you want to use a custom EEL helper, make sure to register it in the package's Settings. EEL +helpers configured for Neos.Fusion are not automatically available: + +```yaml +Flowpack: + NodeTemplates: + defaultEelContext: + My.Foo: 'My\Site\Eel\Helper\FooHelper' +``` + ## Fine-grained error handling, resuming with the next possible operation. In the first step the configuration is processed, exceptions like those caused by an EEL Expression are caught, and any malformed parts of the template are ignored (with their errors being logged).