You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Neos Node Templates
2
2
3
-
When using Neos CMS as an editor, you often work with nested node structures that
3
+
When using Neos CMS as an editor, you often work with nested node structures that
4
4
have to be created manually. This packages aims at easing the editing workflow by
5
-
automatically creating helpful child nodes and making useful modifications to node
5
+
automatically creating helpful child nodes and making useful modifications to node
6
6
properties when creating new nodes in the Neos UI.
7
7
8
8
In contrast to child nodes that are defined in the regular node type definition
9
-
(which cannot be removed by the editor), all modifications that are made when a
9
+
(which cannot be removed by the editor), all modifications that are made when a
10
10
template is applied can be changed or removed by the editor.
11
11
12
12
The desired node structure is defined in a declarative way in the NodeTypes.yaml
@@ -89,7 +89,7 @@ You can also access data from the node creation dialog if you use the
89
89
ui:
90
90
showInCreationDialog: true
91
91
'cardTitle':
92
-
type: string:
92
+
type: string
93
93
label: 'Card Title'
94
94
options:
95
95
template:
@@ -129,7 +129,7 @@ templates) from being applied, its most common use case is conditional child nod
129
129
### Loops
130
130
131
131
Loops can be used to create multiple child nodes. You can use ``withItems`` to define the items
132
-
of the loop. When using EEL, be sure to return an array. The current item is available in EEL
132
+
of the loop. When using EEL, be sure to return an array. The current item is available in EEL
133
133
expressions as the ``item`` context variable.
134
134
135
135
The following example creates three different text child nodes in the main content collection:
@@ -259,17 +259,22 @@ My.NodeType:Bar (depends on "data" context)
259
259
260
260
The standalone validation should detect errors and prevents editors having to deal with these errors at runtime.
261
261
262
-
For more complex templates, which are dependent on the node creation data, it is recommended to write separate tests. Currently, errors in templates depending on the data context will only be treated as warning, as they are probably not an issue at runtime.
262
+
For more complex templates, which are dependent on the node creation data, it is recommended to write separate tests. Currently, errors in templates depending on the data context will only be treated as warning, as they are probably not an issue at runtime.
263
263
264
264
## Create template from node subtree
265
265
266
266
When creating a more complex node template (to create multiple pages and content elements) it can be helpful to take the current node subtree from your workspace as reference.
// 'message' => 'Template for "WithOneEvaluationException" was not applied. Only Node /sites/test-site/homepage/main/new-node@live[Flowpack.NodeTemplates:Content.WithOneEvaluationException] was created.',
54
-
// 'severity' => 'ERROR'
55
-
// ],
56
-
// [
57
-
// 'message' => 'Expression "${\'left open" in "childNodes.abort.when" | EelException(The EEL expression "${\'left open" was not a valid EEL expression. Perhaps you forgot to wrap it in ${...}?, 1410441849)',
0 commit comments